![]() This can be tricky to understand and agree on some classify JavaScript as an interpreted language. JavaScript defies classification because at a very technical level it is compiled before being interpreted by the browser line by line. Then we have JavaScript…a language that we cannot definitively classify as neither compiled nor interpreted. On the other side, interpreted languages such as Python or PHP (, 2020) are interpreted at runtime. Some classic examples of this are languages such as C, C++, and Haskell. Compiled languages need a compiler to turn written code into machine code that will be executed later. There are two types of programming languages: compiled and interpreted. How JavaScript worksīefore diving into the fun part, a.k.a “how to break your code with the correct missing semicolon,” let’s take a moment to try to better understand how JavaScript as a programming language works in the background. To simplify the idea further, normally a missing semicolon won’t break your JavaScript code as it would in another programming language such as Java or the C family, but there’s a catch: Sometimes you can and will break your javascript code for a missing semicolon in the right (or wrong, maybe?) conditions. ![]() JavaScript sometimes gives us so much freedom that some practices end up being “optional”, and an example of this is the use-or lack of use-of certain semicolons. ![]() Let’s start with two basic but very important ideas: 1) JavaScript is a flexible language, and 2) some semicolons in JavaScript are more needed than others.
0 Comments
Leave a Reply. |