Domanda di colloquio di Mindera

Is JavaScript single-threaded or multi-threaded?

Risposta di colloquio

Anonimo

26 lug 2025

JavaScript is single-threaded by nature. This means code executes sequentially in a single thread. However, we can handle some concurrency using asynchronous APIs like setTimeout, setInterval, Promises, and Web Workers.