JavaScript is a single-threaded language. And since it can’t spawn more threads, if an I/O operation is started, it will block the execution of the main (and only) thread. Therefore, it has what is called a callback. A callback is a function passed to an I/O op that gets called when that op has been completed.