Sometimes, you’ll want to leave some notes in your code, to help remind you later what the code does or why you wrote it a certain way. We can create a comment by using two forward slashes:
Comments won’t have any effect on the actual program when it runs - they’re purely for humans to read!
You can also make a longer comment, by using a forward slash and an asterisk: /* followed by an asterisk and a forward slash: */
Sometimes you’ll hear programmers refer to “commenting out” code. That just means turning your code into a comment by putting the // in front of it. This can by handy if you want to disable part of your code, but keep it around for reference.
Example: