1. . Advanced JavaScript features include:
(A) Only HTML structure
(B) Only var and function
(C) ES6+ syntax, promises, async/await, modules, and classes
(D) Only CSS styling
2. . ES6 arrow functions are preferred because:
(A) They optimize CPU usage
(B) They are slower than traditional functions
(C) They only work in HTML
(D) They provide concise syntax and preserve the this context
3. . JavaScript classes are used to:
(A) Optimize CPU only
(B) Style HTML elements
(C) Structure CSS grids
(D) Create objects with properties and methods using a blueprint
4. . Promises in JavaScript are used to:
(A) Style elements dynamically
(B) Handle asynchronous operations and avoid callback hell
(C) Change HTML structure
(D) Manage CPU usage
5. . The async keyword is used to:
(A) Create CSS animations
(B) Pause code execution
(C) Declare an asynchronous function that returns a promise
(D) Style HTML elements
6. . The await keyword is used to:
(A) Add events to DOM elements
(B) Create new objects
(C) Style HTML elements
(D) Wait for a promise to resolve inside an async function
7. . Template literals in JavaScript use:
(A) Backticks ` for multi-line strings and variable interpolation
(B) Single quotes ' ' only
(C) Double quotes " " only
(D) Curly braces { } only
8. . Destructuring in JavaScript is used to:
(A) Optimize CPU
(B) Remove elements from HTML
(C) Style text
(D) Extract values from arrays or objects into variables
9. . Default parameters in functions allow:
(A) Declaring CSS properties
(B) Specifying default values for parameters if not provided
(C) Setting HTML attributes
(D) Optimizing CPU
10. . The spread operator ... is used for:
(A) Expanding arrays or objects into individual elements
(B) Looping through arrays
(C) Styling HTML
(D) Declaring functions only
11. . The rest operator in function parameters is used to:
(A) Remove HTML elements
(B) Collect multiple arguments into an array
(C) Style elements
(D) Optimize CPU
12. . Modules in JavaScript allow:
(A) Styling CSS
(B) Organizing code into separate files with export and import
(C) Structuring HTML
(D) CPU optimization
13. . Closures in JavaScript:
(A) Optimize CPU only
(B) Are used to style elements
(C) Allow functions to access variables from outer scopes even after outer function has executed
(D) Structure HTML only
14. . The map() method in arrays:
(A) Deletes array elements
(B) Creates a new array by applying a function to each element
(C) Styles elements
(D) Changes object properties only
15. . The filter() method in arrays:
(A) Optimizes CPU only
(B) Changes CSS
(C) Modifies DOM elements
(D) Creates a new array containing elements that pass a test function
16. . The reduce() method in arrays:
(A) Creates new objects only
(B) Styles text
(C) Deletes DOM elements
(D) Reduces an array to a single value by applying a function cumulatively
17. . The Proxy object in JavaScript is used for:
(A) Structuring HTML
(B) Styling elements
(C) Intercepting and customizing operations on objects
(D) Optimizing CPU only
18. . The Set object in JavaScript:
(A) Stores unique values of any type
(B) Stores duplicate values only
(C) Styles HTML elements
(D) Structures CSS grids only
19. . The Map object in JavaScript:
(A) Optimizes CPU only
(B) Stores values only
(C) Styles elements
(D) Stores key-value pairs and preserves insertion order
20. . The ultimate goal of Advanced JavaScript is:
(A) Only structure HTML
(B) Build complex, modular, maintainable, and asynchronous web applications
(C) Only style web pages
(D) Optimize CPU only