In a previous article, we detailed how JavaScript’s engine works in terms of event execution and briefly mentioned compilation. Yes, you read that correctly. JavaScript is compiled, though unlike other language compilers that have build stages that allow for early optimization, JavaScript’s compilers are forced to compile the code at the last second — literally.
Full article