Logo

Javascript Questions Set 148:

Quiz Mode

What is the web equivalent of querySelectorAll()?

1
2
3
4

Solution:

The default attribute of the async attribute is ____

1
2
3
4

Solution:

What is the significance of scripting in web development?

1
2
3
4

Solution:

How do you focus a particular element on an HTML page using JavaScript?

1
2
3
4

Solution:

What is the lifetime of the data stored through localStorage?

1
2
3
4

Solution:

Which is the event handler method used to invoke when uncaught JavaScript exceptions occur?

1
2
3
4

Solution:

When should the startOverlays() method be used?

1
2
3
4

Solution:

 The function definitions in JavaScript begins with _______ 

1
2
3
4

Solution:

Predict the output:


function printMessage(message) {
return function() {
console.log(message);
}
}

var printHello = printMessage("Hello");
printHello();

var printHi = printMessage("Hi");
printHi();

1
2
3
4

Solution:

What is the difference between these two ways of creating an Error object?


const x = Error('I was created using a function call!');
​​​​
const y = new Error('I was constructed via the "new" keyword!');

1
2
3
4

Solution: