0
What are comments for? It doesnt even show up in the output.
5 Antworten
+ 10
So that people understand what your code is about.
+ 8
Comments are both for you and other programmers. They are important for better readability and understanding of a code.
+ 3
they are to make code understandable as which thing was for what.
+ 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.
0
Comments are helping developers to understand the meaning of the code.