JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Javascript interview questions part 30
Javascript interview questions part 30
Back
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?
A. It does nothing but a simple breakpoint
B. It debugs the error in that statement and restarts the statement’s execution
C. It is used as a keyword that debugs the entire program at once
D. It is used to find error in the statement
Show Correct Answer
Correct Answer is :
It does nothing but a simple breakpoint
2. Among the keywords below, which one is not a statement?
A. debugger
B. with
C. if
D. use strict
Show Correct Answer
Correct Answer is :
use strict
3. The functions provide() and require() of Dojo toolkit and Google’s Closure library are used for
A. declaring and loading modules
B. declaring functions
C. declaring modules
D. loading modules
Show Correct Answer
Correct Answer is :
declaring and loading modules
4. The maximum number of global symbols a module can define is ____________
A. 2
B. 3
C. 1
D. 4
Show Correct Answer
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
A. sets = sets.AbstractEnumerableSet.extend();
B. sets.SingletonSet = sets.AbstractEnumerableSet.extend(...);
C. sets.SingletonSet = sets.extend(...);
D. sets = sets.extend(...);
Show Correct Answer
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 ?
A. The programmer imports at once the frequently used values into the global namespace
B. There is no efficiency quotient, the programmer tries to make it inefficient
C. The programmer needs to import the Sets everytime he wants to use it
D. the programmer imports the set everytime the statement is encountered
Show Correct Answer
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 ________
A. Predefined function
B. Module function
C. Public function
D. Private function
Show Correct Answer
Correct Answer is :
Module function
8. Modules that have more than one item in their API can ________
A. Assign itself to a global variable
B. Invoke another module of the same kind
C. Return a namespace object
D. Invoke another module of the same kind
Show Correct Answer
Correct Answer is :
Return a namespace object
9. The provides() function and the exportsobject are used to _________
A. Register the module’s API and Store their API
B. Call the modules api
C. Store the module’s API
D. Register the modules api
Show Correct Answer
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;
A. Importing a single module
B. Importing a module partially
C. Importing a namespace
D. Importing the entire module
Show Correct Answer
Correct Answer is :
Importing the entire module
11. The properties() method is a ________
A. Enumerable method
B. Non-enumerable method
C. Operational method
D. calling method
Show Correct Answer
Correct Answer is :
Non-enumerable method
12. What can be done in order to avoid creation of global variables in JavaScript?
A. To use a method that defines all the variables
B. To use an object that has the reference to all the variables
C. To use an object as its namespace
D. To use global functions
Show Correct Answer
Correct Answer is :
To use an object as its namespace
13. The events that are not triggered directly by user activity are called
A. Device-independent input events
B. Device-dependent input events
C. User interface events
D. State change events
Show Correct Answer
Correct Answer is :
State change events
14. The video and the audio belong to the
A. Timers and error handlers
B. API-Specific events
C. State change events
D. User interface events
Show Correct Answer
Correct Answer is :
API-Specific events
15. The client-side JavaScript asynchronous programming model contains
A. Timers and error handlers
B. User interface events
C. State change events
D. API-specific events
Show Correct Answer
Correct Answer is :
Timers and error handlers
16. Which are the events that have default actions that can be canceled by event handlers?
A. Submit and form-related events
B. Reset and form-related events
C. Submit and reset events
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Submit and reset events
17. The events that represents occurrences related to the browser window are
A. Window
B. Element
C. Display
D. Handlers
Show Correct Answer
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?
A. Window
B. Load
C. Element
D. Handler
Show Correct Answer
Correct Answer is :
Load
19. Which is the alternative to the load event?
A. readychange
B. changestate
C. readystatechange
D. contentloader
Show Correct Answer
Correct Answer is :
readystatechange
20. Which is the opposite to the load event in JavaScript?
A. dontload
B. postload
C. preload
D. unload
Show Correct Answer
Correct Answer is :
unload
Similar Interview Questions
Search for latest jobs
Find Jobs