- 1
Can anyone explain the use of comments?
8 Respostas
+ 3
writing comments while coding helps to understand other coders what actually you have done with code. It makes you as well as others to grasp the theme of codes in short time...
+ 2
comment shows a block of code that wouldn't be compiled
+ 1
Comments are, most of the times, used by a programmer for either himself or other programmers to have a better understanding of the code. It can be used for: recalling the idea of the code, helping code-viewers or coders understand the code, giving credits (rarely) et cetera.
0
comments is a additional text to explain or note some code.
0
can anyone of u give an example of comment with full coding and are comments hidden for other programmers who r viewing our project?
0
The comments are visible when you're viewing the code but gets ignored in the execution process.
Assuming from your 'HTML' tag, comment in HTML can be used like:
<!-- your comment here -->
Example:
<b>Hello</b><!-- the text style is to be bold -->
Here, when you load the page you can see 'Hello' text in bold style but not the comment, which is only visible if you view its source.
0
I think that there is not too much use of comments.. Am I right?
0
Depends on the coder.
I personally either forget or get bored to leave comments, which is a bad practice though.