Advanced JavaScript Concepts

Challenge yourself with closures,prototypes,and asynchronous behavior.

1. What is a closure in JavaScript?
2. Which method is used to handle rejection in a Promise?
3. How is 'this' determined in an arrow function?
4. What is the primary role of the event loop in JavaScript?
5. What is the purpose of the prototype chain?
6. Which keyword is used to declare a class in ES6?
7. Which are valid approaches to handle asynchronous operations in JavaScript?
8. Which statements about object destructuring are true?
9. What are characteristics of ES6 modules?
10. Which built-in objects are iterable (support for...of loops)?
11. Which methods create a shallow copy of an array?
12. Hoisting affects both variable declarations and function declarations.
13. In a regular global function, 'this' refers to the window object in browsers (non-strict mode).
14. Generator functions use the 'yield' keyword to pause and resume execution.
15. WeakMap keys can be primitive values like strings or numbers.
16. What is the abbreviation for Asynchronous JavaScript and XML?
17. What constructor creates a new Promise object (case-sensitive, starts with 'P')?
18. What keyword pauses a generator function and returns a value to the iterator?
19. What term describes a function that retains access to variables from its outer scope after the outer function exits?
20. What object defines custom behavior for operations like property lookup on another object?
Answered 0 of 0 — 0 correct