Let me explain how dangerous this when you are coding your program using a javascript. Javascript has a syntax parser where he checks your code before you run it. A simple example of this is the syntax “return”. When the javascript compiler checks your code it will check the reserved word that you have written and the compiler will do this character by character. When the compiler detect that you have used a correct syntax, for example, the “return” it will return as undefined. In another programming language like java,c++, and C#, when you did not put the semicolon, your application will not run and before you can run the application it will show you as an error. Let me show you an example:

//example 1 function run(){ return { customer: "walk" } } run(); //the output of this is undefined
function run(){ return { customer: "walk" } } // the ourput of this is the object

Check the example 1 and example 2 and compare them. The first example is that the curly braces are located on the next line while the 2nd example is on the same line. If the compiler detected that there’s another character after your “return” a syntax. It will show you expected result. So if you are a programmer and you love javascript think about how you code especially when you missed to add a semicolon and asking yourself how your application works without a semicolon. Javascript has an auto-insertion of semicolon that you must know how it will work in the engine.!

HAPPY CODING-Luckyguru

-Luckyguru