JavaScript can run on any device that has a JavaScript Runtime Environment (JRE). The heart of the JRE is the JS Engine — a piece of software (not hardware) that interprets and executes JavaScript.
The event loop is JavaScript's secret weapon — it coordinates the Call Stack, Web APIs, Callback Queue, and Microtask Queue to enable non-blocking async behavior in a single-threaded language.
Sometimes you need to modify your HTML to work around differences in browsers and operating systems. And sometimes you need to do something that HTML just doesn't do ...