Comment Syntax Quiz
Multiple Choice Beginner
Question
Which of these creates a single-line comment in JavaScript?
Hint
Python uses #, but JavaScript uses a different symbol.
Explanation
In JavaScript, // creates a single-line comment — everything after // on that line is ignored. /* ... */ creates a multi-line comment. # is used in Python and Ruby, not JavaScript. -- is used in SQL. Comments are ignored by the interpreter and are for human readers.
Related Resources
Related Lessons
- Comments and Readability
Learn about comments and code readability.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.