Question 96
Refer to the following code:
Let obj ={
Foo: 1,
Bar: 2
}
Let output =[],
for(let something in obj{
output.push(something);
}
console.log(output);
What is the output line 11?
Question 97
Refer tothe code below:
What is the value of result after line 10 executes?
Question 98
A test searches for:
<button class="blue">Checkout</button>
But the actual HTML is:
<button>Checkout</button>
The test fails because it expects a class that no longer exists.
What type of test outcome is this?
Question 99
Refer to the code below:
01 const server = require('server');
02
03 // Insert code here
A developer imports a library that creates a web server. The imported library uses events and callbacks to start the server.
Which code should be inserted at line 03 to set up an event and start the web server?
Question 100
Refer to the following code block (with corrected template literals using backticks):
01 class Animal {
02 constructor(name) {
03 this.name = name;
04 }
05
06 makeSound() {
07 console.log(`${this.name} is making a sound.`);
08 }
09 }
10
11 class Dog extends Animal {
12 constructor(name) {
13 super(name);
14 this.name = name;
15 }
16 makeSound() {
17 console.log(`${this.name} is barking.`);
18 }
19 }
20
21 let myDog = new Dog('Puppy');
22 myDog.makeSound();
What is the console output?
