Definition: Comments are used to explain JavaScript code and make it more readable for human developers.
Crucially, comments are completely ignored by the browser engine during execution. They do not affect the website's performance or logic.
They are also used to "comment out" code during testing to prevent specific lines from running.
// Single line comment
// alert("Ignored");
/* Multi-line
comment for
longer notes
*/
console.log("Only this runs");