Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
This Comments worksheet is part of the JavaScript Coding without HTML and CSS journey. Print it as a booklet?
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1// This explains the code | AA single-line comment ignored by JavaScript | |
| 2/* This spans multiple lines */ | B// a helpful note | |
| 3Text meant for humans, not the computer | C/* note more notes */ | |
| 4Ignored across several lines of code | DWrong - that's HTML syntax, not JavaScript | |
| 5-- This is a comment | EA multi-line comment ignored by JavaScript | |
| 6<!-- This is a comment --> | FWrong - JavaScript comments use //, not -- |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
// — Marks the rest of a line as a comment, which JavaScript ignores when running the code.// This is a commentlet x = 5; // set x to 5/* Multi-line comment startEnd of comment */// Ignored by JavaScript