Asynchronous Programming
JavaScript is a single threaded, event driven, asynchronous programming language. What does this mean? This means that JavaScript runs on a single thread and delays/handles certain events or function calls through an event queue. We will break down the basics of how JavaScript does this through the following topic.
Sync Versus Async
What does it mean for code to be synchronous or asynchronous? These two buzzwords get thrown around a lot in JavaScript. Synchronous is derived from the Greek root syn, meaning "with", and chronos, which means "time". Synchronous literally means "with time", or rather, code that is coordinated with time. Lines of code are run one at a time and are not started until the previous line has been handled. Asynchronous, or async, is derived from the Greek root async, meaning "not with", and chronos, hence asynchronous literally means "not with time" or rather, code that is not coordinated with time. The order code that is run is not coordinated...