0

It is an eXtremely newbie question, but I don't know: What do a comment do? I didn't get anything about it.

26th Apr 2020, 7:23 PM
cam ege
cam ege - avatar
4 Respuestas
+ 2
As mentioned by others, comments are ignored by the compiler. They do not do anything in your program. They are there for you and others to better understand certain parts of your code. Perhaps you write some function that is fairly complex and hard to understand. You can leave some comments to remind yourself what it does and then leave some comments that give you a step by step breakdown. Comments are a standard practice in coding and can be especially useful for beginners. They are not a requirement, but strongly recommended.
26th Apr 2020, 8:13 PM
Ian Stewart
Ian Stewart - avatar
+ 3
You can write things on comment just for you to understand something.This comment wont be displayed when you run the code.Comment isn't visual on webpage.
26th Apr 2020, 7:32 PM
Samira
Samira - avatar
+ 1
A comment is a line of code that is ignored by the compiler used for reference
26th Apr 2020, 7:31 PM
Hansel
+ 1
A comment doesn't do anything... It's like a sticky note on a desktop! It's just used to remind yourself of something or to organize your code.
27th Apr 2020, 6:30 AM
Giancarlo Bachir