Instruction 5

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Using Comments

Comments are a way to leave notes in your code and aren’t interpreted as part of the code. These notes could be short or long. For short comments, write your notes after // followed by a space. This type of comment is usually left as a note to self:

Creating Code Comments

Comments in programming can also exclude a piece of code. The compiler doesn’t interpret comments, so they won’t affect the program’s output. Consider the following example:

See forum comments
Download course materials from Github
Previous: Instruction 4 Next: Demo