Javascript interview questions part 8

Javascript interview questions part 8

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

Total Questions: 20

1. Which is more widely used than GWT in Google?

Correct Answer is : Closure

2. Which are the forms of client-side storage?

Correct Answer is : All of the mentioned

3. Which is the storage that allows the caching of web pages and their associated resources?

Correct Answer is : Offline Web Applications

4. Which is the Microsoft’s own proprietary client-side storage?

Correct Answer is : IE User Data

5. Which object supports Filesystem API?

Correct Answer is : File

6. Which is the most appropriate database for developers requiring a huge amount of data?

Correct Answer is : Web databases

7. The localStorage and sessionStorage belongs to ___________

Correct Answer is : Window object

8. What is the main difference between localStorage and sessionStorage?

Correct Answer is : Both Lifetime and Scope

9. What is the lifetime of the data stored through localStorage?

Correct Answer is : Permanent

10. Which is the function used to retrieve a value?

Correct Answer is : getItem()

11. Which is the function used to store a value?

Correct Answer is : setItem()

12. What kind of scoping does JavaScript use?

Correct Answer is : Lexical

13. What must be done in order to implement Lexical Scoping?

Correct Answer is : Reference the current scope chain

14. What is a closure?

Correct Answer is : Both Function objects and Scope where function’s variables are resolved

15. Which of the following are examples of closures?

Correct Answer is : All of the mentioned

16. Which of the following uses a lot of CPU cycles?

Correct Answer is : Dynamically generated graphics

17. Consider the following code snippet : var scope = "global scope"; function checkscope() { var scope = "local scope"; function f() { return scope; } return f; } What is the function of the above code snippet?

Correct Answer is : Returns the value in scope

18. What is the fundamental rule of lexical scoping?

Correct Answer is : Functions are executed using scope chain

19. What is the opposite approach to the lexical scoping?

Correct Answer is : Dynamic scoping

20. What is the purpose of the dynamic scoping?

Correct Answer is : Variables can be declared outside the scope

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon