// var i = “Hello world;
var y = “Hello”;
var x = y + ‘ World!’;
console.log(x);
Now when the browser reaches the broken line of code, it will skip right past it like it doesn’t exist, and the rest of our code will execute without any issues.
Commenting your code is an extremely important part of programming. It assists both yourself and other developers in understanding your code when you come to review it in the future. Try to get into the good habit of documenting your code as much as possible.
We have covered a lot of ground in this first look at Javascript, from how to execute it, its syntax and best practice, to core concepts such as variables, operators, functions and more. In the next chapter, we will continue our crucial deep dive into this web design language.