Multiple choice technology programming languages

3) To comment out a line in JavaScript ...

  1. Precede it with two forward slashes, i.e. '//'

  2. Precede it with an asterisk and a forward slash, i.e. '*/'

  3. Precede it with an asterisk, i.e. '*'

  4. Precede it with a forward slash and an asterisk, i.e. '/*'

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Single-line comments in JavaScript start with two forward slashes (//). Option B describes the end of a multi-line comment (/), option C is just multiplication, and option D is the start of a multi-line comment (/), which can span multiple lines but isn't used for single lines.