Coffee School Good practices

Code Editor

Preview

Console Log:

Good practices

Time to complete: 5 minutes

Being able to write away code is great, however you will sometimes want to add notes to your code to make it easier to understand what things do, so for this you will need to use comments. In JS, when you write the // sign, the rest of the line is ignored, so you can write comments

    //This is a comment and will not do anything
    var myName = "Bob";
    var myAge = 14;
    //You can also comment out code
    //myAge = myAge * 2;
    console.log(myName);
    console.log(myAge);