Question 1: What is the main purpose of a Web Worker in JavaScript?
Question 2: Which method is used to send messages from the main thread to a Web Worker?
Question 3: What is a Service Worker primarily used for?
Question 4: Which lifecycle event of a Service Worker is triggered first when it is installed?
Question 5: In a Web Worker, which global object replaces window?
Question 6: Which file type is used to register a Service Worker in a web application?
Question 7: How is a Web Worker terminated from the main thread?
Question 8: Which of the following is NOT a capability of Service Workers?
Question 9: How do you register a Service Worker in JavaScript?
Question 10: Which event in Service Workers is used to handle offline caching of assets?