11.) What does the window.location object represent?
A) The browser’s history.
B) The URL of the current document.
C) The user’s geolocation.
D) The browser’s settings.
12.) How do you create a new Web Worker in JavaScript?
A) new Worker()
B) createWorker()
C) Worker.create()
D) WebWorker()
13.) What does the FileReader API do?
A) Reads files from a remote server.
B) Deletes local files.
C) Writes data to local files.
D) Reads files from the local file system.
14.) Which method is used to trigger a custom event?
A) dispatchEvent()
B) triggerEvent()
C) fireEvent()
D) emitEvent()
15.) What is the purpose of the window.requestAnimationFrame() method?
A) To create animations.
B) To optimize animations by syncing with the screen refresh rate.
C) To stop animations.
D) To reload the page.
16.) How do you create a custom animation using the Web Animations API?
A) Use element.animate() method.
B) Use CSS.animate() method.
C) Use window.createAnimation() method.
D) Use animation.create() method.
17.) What does the performance.now() method return?
A) The current time in milliseconds.
B) The time since the browser was opened.
C) The time since the page started loading.
D) The user’s system time.
18.) What does the IntersectionObserver API do?
A) Observes changes to DOM nodes.
B) Tracks visibility of elements within the viewport.
C) Monitors resizing of elements.
D) Observes HTTP requests.
19.) What is the purpose of the Blob object?
A) To represent binary data.
B) To compress data.
C) To create HTML elements.
D) To store cookies.
20.) What is the purpose of the AbortController API in JavaScript?
A) stop animations on a webpage.
B) To cancel asynchronous operations like fetch().
C) To clear browser history.
D) To halt DOM rendering.
Related