What's the point of comments? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What's the point of comments?

I read the comments in the Q&A section but I still do not understand why it should be used.

1st Dec 2016, 11:10 PM
Lacey Riley
Lacey Riley - avatar
7 Answers
+ 8
To make it easier for others to read it. When you work for a company you will have to put comments in your code. Otherwise other people may have difficulty in understanding your code. You should use comments in any language. maybe except for HTML and XML
1st Dec 2016, 11:19 PM
Nedim Kanat
Nedim Kanat - avatar
+ 6
For comment in your code. Suppose you have written a heavy code(large code). You cannot remember everything you comment for remember what is the purpose of this line. Again if you work in an company, you have write their front end or back end of website or any application program. A new guy/girl get the same job and how do he or she know what is the purpose of that line.
2nd Dec 2016, 2:41 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 4
It is useful for adding notation to the code without it appearing on the page when it is run.
1st Dec 2016, 11:17 PM
Kegan McAfee
Kegan McAfee - avatar
+ 1
thanks everybody! Today is my second day learning code.
1st Dec 2016, 11:21 PM
Lacey Riley
Lacey Riley - avatar
+ 1
to remember thing you did
30th Dec 2016, 2:53 AM
Abdel
Abdel - avatar
0
Comments makes your code very ellegant i mean very clear so when your looking after some part from your web page you won't be struggling to find it 😁😉
9th Dec 2016, 2:20 PM
Zouhair Loucif
Zouhair Loucif - avatar
0
learning code is getting more interesting
16th Dec 2016, 9:28 AM
Freewill Clement Agu
Freewill Clement Agu - avatar