Single line comments are depicted by the two forward slashes //.
Check out the example for single line comment.
// Update header: document.getElementById("header").innerHTML = "Hello World!"; // Update sidebar: document.getElementById("sidebar").innerHTML = "Hey There!";
A single line comment above every line of code is very useful to make us understand the code.
/* We've declared 3 values variables and assigned 3 numerical values to all those 3 variables. */ let x = 2; let y = 4; let z = 8;