JavaScript Comments
Use // for a single line comment and /* ... */ for several lines. Comments are ignored when the code runs. Use them to explain why you did something, not to repeat what the code obviously does.
Example
// A single line comment
let price = 20; // inline comment
/* A comment
over several lines */
console.log(price);Exercise
Start a single line comment.
this line is ignoredQuiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.