1.

Which of the following is a global object for a new worker?(a) WorkerGlobalScope(b) Worker(c) WorkerScope(d) WindowI got this question in an internship interview.The above asked question is from Web Workers in portion Caching, Debugging and Animation of JavaScript

Answer»

The correct answer is (a) WorkerGlobalScope

The EXPLANATION is: A web WORKER is a JavaScript that runs in the background, independently of other scripts, WITHOUT affecting the performance of the page. The WorkerGlobalScope is the global object for a new worker, and it is what a worker THREAD looks LIKE, on the inside, to itself.



Discussion

No Comment Found

Related InterviewSolutions