What is the actual use of document comments | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What is the actual use of document comments

1st May 2019, 3:55 AM
Siddhant Kundargi
2 Answers
+ 9
Siddhant Kundargi Comments in any language are added for the purpose for making the code easier to understand by the coder himself(if he visited his code after a long time) or for others who viewed the source code. These explain what part of code perform which function. Moreover the comment are ignored by compilers and interpreter. https://www.sololearn.com/Discuss/1765511/?ref=app
1st May 2019, 4:15 AM
Gurpreet Jhamat
Gurpreet Jhamat - avatar
+ 2
You can also basically view them as notes. Comment what the code does or what the output will be.
21st May 2019, 4:17 AM
Pamela Stacey Alvarez
Pamela Stacey Alvarez - avatar