What is the use of comments please give correct answer. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the use of comments please give correct answer.

16th Apr 2018, 4:54 PM
Sibin K Philip
2 Answers
+ 5
making it easier for knowing what part of the code exactly do. Remembering details you'd forget. Making it easier for other people to read your code.
16th Apr 2018, 4:58 PM
Welliton Malta
Welliton Malta - avatar
+ 2
If you're a new coder you should definitely use them all the time to write what the code you just type does. That way you can use your code as study material. Also, it will become a healthy habit, not only for yourself (which is pretty important by itself), but to make it readable for others. You can't assume everybody is gonna understand what you want to do with your code, and if you wanna share your program or get help, you need to make it readable. Comments are the easiest thing to do in a code, and one of the most important too, don't underestimate them
16th Apr 2018, 5:26 PM
Juan Serrano
Juan Serrano - avatar