| Snaprecruit.com

| Snaprecruit.com

Interview question based on skill :

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Consider the following code snippet function f(o) { if (o === undefined) debugger; } What could be the task of the statement debugger?

Correct Answer is : It does nothing but a simple breakpoint

2. Among the keywords below, which one is not a statement?

Correct Answer is : use strict

3. The functions provide() and require() of Dojo toolkit and Google’s Closure library are used for

Correct Answer is : declaring and loading modules

4. The maximum number of global symbols a module can define is ____________

Correct Answer is : 1

5. To define each of the set classes as a property of the sets object (namespace) for the module, the statement is

Correct Answer is : sets.SingletonSet = sets.AbstractEnumerableSet.extend(...);

6. Consider the following statement var Set = sets.Set; var s = new Set(1,2,3); What could be the efficiency quotient of the above two statements ?

Correct Answer is : The programmer imports at once the frequently used values into the global namespace

7. The scope of a function is also called as ________

Correct Answer is : Module function

8. Modules that have more than one item in their API can ________

Correct Answer is : Return a namespace object

9. The provides() function and the exportsobject are used to _________

Correct Answer is : Register the module’s API and Store their API

10. What could be achieved by running the code snippet below? var sets = com.davidflanagan.collections.sets;

Correct Answer is : Importing the entire module

11. The properties() method is a ________

Correct Answer is : Non-enumerable method

12. What can be done in order to avoid creation of global variables in JavaScript?

Correct Answer is : To use an object as its namespace

13. The events that are not triggered directly by user activity are called

Correct Answer is : State change events

14. The video and the audio belong to the

Correct Answer is : API-Specific events

15. The client-side JavaScript asynchronous programming model contains

Correct Answer is : Timers and error handlers

16. Which are the events that have default actions that can be canceled by event handlers?

Correct Answer is : Submit and reset events

17. The events that represents occurrences related to the browser window are

Correct Answer is : Window

18. Which event is fired when a document and all of its external resources are fully loaded and displayed to the user?

Correct Answer is : Load

19. Which is the alternative to the load event?

Correct Answer is : readystatechange

20. Which is the opposite to the load event in JavaScript?

Correct Answer is : unload