Comments – leaving yourself notes or reminders
Comments are a great way to create notes or reminders to yourself. When you comment code, it means that it will not be executed when your code runs. There are two types of comments used //
or /* */. //
is typically used for a one-line comment and /**/
is used for a block of text.
You can add comments to your code, such as a TODO
item or just a brief explanation of what something is doing.
Let's see what both of these look like: