Capgemini Interview Question

How the JavaScript works and process the threads?