JavaScript ES6+ Features

Assess your knowledge of modern JavaScript features like arrow functions,destructuring,and modules.

1. Which keyword is used for block-scoped variable declaration in ES6?
2. Which of the following features were introduced in ES6 (2015)?
3. Arrow functions have their own 'this' binding.
4. What characters are used to enclose template literals in ES6?
5. Which operator is used for the rest parameter syntax in ES6?
6. Which of these are valid uses of destructuring assignment in ES6?
7. const declarations create immutable values.
8. What is the output of `[1, 2, 3].find(x => x > 2)`?
9. Which ES6 feature allows specifying default values for function parameters?
10. Which array methods were introduced in ES6?
11. The spread operator (...) can be used to merge two arrays.
12. What keyword is used to export a default value from an ES6 module?
13. What does the 'import' statement do in ES6 modules?
14. Which of the following are features of ES6 classes?
15. ES6 introduced the 'Promise' object for asynchronous operations.
16. What is the output of `const {x=10} = {x: undefined}; console.log(x)`?
17. Which ES6 feature provides a concise syntax for writing function expressions?
18. Which of the following are valid ways to declare an ES6 class?
19. Optional chaining (?.) was introduced in ES6.
20. What operator is used for nullish coalescing in ES2020 (a post-ES6 feature)?
Answered 0 of 0 — 0 correct