ExamVeda
Login
Home
1
Which function among the following lets to register a function to be invoked once?
Discuss
Answer & Solution
Answer: Option A
Solution:
setTimeout() and setInterval() allow you to register a function to be invoked once or repeatedly after a specified amount of time has elapsed.
2
Which function among the following lets to register a function to be invoked repeatedly after a certain time?
Discuss
Answer & Solution
Answer: Option C
Solution:
setTimeout() and setInterval() allow you to register a function to be invoked once or repeatedly after a specified amount of time has elapsed.
3
Which is the handler method used to invoke when uncaught JavaScript exceptions occur?
Discuss
Answer & Solution
Answer: Option B
Solution:
The onerror handler method can be registered to be invoked when uncaught JavaScript exceptions occur.
4
Which property is used to obtain browser vendor and version information?
Discuss
Answer & Solution
Answer: Option D
Solution:
The navigator property is used to obtain browser vendor and version information.
5
Which method receives the return value of setInterval() to cancel future invocations?
Discuss
Answer & Solution
Answer: Option C
Solution:
Like setTimeout(), setInterval() returns a value that can be passed to clearInterval() to cancel any future invocations of the scheduled function.
6
The setTimeout() belongs to which object?
Discuss
Answer & Solution
Answer: Option B
Solution:
The setTimeout() method of the Window object schedules a function to run after a specified number of milliseconds elapses.
7
Which method receives the return value of setTimeout() to cancel future invocations?
Discuss
Answer & Solution
Answer: Option A
Solution:
setTimeout() returns a value that can be passed to clearTimeout() to cancel the execution of the scheduled function.
8
What will happen if we call setTimeout() with a time of 0 ms?
Discuss
Answer & Solution
Answer: Option B
Solution:
If you call setTimeout() with a time of 0 ms, the function you specify is not invoked right away. Instead, it is placed on a queue to be invoked “as soon as possible” after any currently pending event handlers finish running.
9
To which object does the location property belong?
Discuss
Answer & Solution
Answer: Option A
Solution:
The location property of the Window object refers to a Location object, which represents the current URL of the document displayed in the window, and which also defines methods for making the window load a new document.
10
What is the result of the following code snippet?
window.location === document.location
Discuss
Answer & Solution
Answer: Option B
Solution:
The above code always results in a true value.