+ 1

What are the uses of comments?

14th Apr 2017, 5:06 AM
huzaifa
huzaifa - avatar
3 Respuestas
+ 10
<!-- Just to know why you wrote the line of code below or above the comment --> It cannot be executed but helps to programmer to know why he inserted a particular line of code in the programmer
14th Apr 2017, 5:17 AM
Sachin Artani
Sachin Artani - avatar
+ 2
comments are helpful for better understanding of code like where u used which functions and for what purposes this makes u easily remember the code...
14th Apr 2017, 5:14 AM
Suhail Pappu
Suhail Pappu - avatar
0
In html (you used the "html" tag), strongly nested <div> blocks with lots of text in between can be difficult to follow. Remember that the closing tag does not come with the same information as a leading <div id="stuff" class="otherstuff">. It is just </div>. I always found comments very helpful to maintain some overview: <div class"="this"> ... <div class"="that"> ... <div class"="something"> ... </div> <!-- end of something --> </div> <!-- end of that --> </div> <!-- end of this -->
14th Apr 2017, 6:13 AM
Klaus-Dieter Warzecha
Klaus-Dieter Warzecha - avatar