4

I'm learning about the event loop from this blog but seems like the author goes into general computer program concepts I'm not too familiar with -

This includes HTTP requests, database operations and disk reads and writes; the single thread of execution asks the runtime to perform an operation, providing a callback function and then moves on to do something else.

Is the single thread of execution part of Javascript that is used to talk to another part of Javascript, which is the runtime? Or is the execution part of the browser? I'm probably completely wrong, but my understanding so far is that when you go to a webpage, the browser gets some javascript, and has only a thread to execute that javascript, so it uses that thread to send a message to the runtime, which is part of the cpu to actually run that script and that's results in the script working on your webpage?

akantoword
  • 2,824
  • 8
  • 26
  • 43

0 Answers0