are not the same. Because “World” in the second variable starts with a capital W, they are considered two different variables.
To print or write a data, we use console.log method.
The first way is called inline commenting. Any text in a line that follows two forward slash signs // is commented out.
The second way is called block commenting. Any text in the lines between */ and /* are block comments. The difference between inline commenting and block commenting is that in inline commenting we can comment out only one line at a time. If our comments are continued in the second line or the next, we have to use // in the beginning of every line. It is preferable to use // for one line or a few lines of commenting. On the contrary, when we have a comment that takes up several lines or consist of a block of code, it is better to use */ … /* block commenting. This way we do not have to type the comment sign to every line.
If you found the article helpful, don’t forget to clap a few times to show your support.
Read my previous blog posts here.