What are comments for? It doesnt even show up in the output. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What are comments for? It doesnt even show up in the output.

23rd Jan 2017, 2:25 AM
Ciege2500
Ciege2500 - avatar
5 Answers
+ 10
So that people understand what your code is about.
23rd Jan 2017, 2:26 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 8
Comments are both for you and other programmers. They are important for better readability and understanding of a code.
23rd Jan 2017, 2:45 AM
Heroes Killer
Heroes Killer - avatar
+ 3
they are to make code understandable as which thing was for what.
23rd Jan 2017, 4:11 AM
Sandeep Chatterjee
+ 2
To give an example to previous comments about readability; Say you where to work on some code and send it off for publication. That code could work for a year or two before you get asked to update it to add a new page or fix a new found error. Either you or whoever the code is sent to then has to figure out what the code does. The comments will cut out hours of sorting out the code and errors can be found much faster. Hope this helped.
23rd Jan 2017, 2:06 PM
Stephen K
Stephen K - avatar
0
Comments are helping developers to understand the meaning of the code.
2nd Feb 2017, 8:13 AM
yang hank
yang hank - avatar