- 1

Can anyone explain the use of comments?

25th Nov 2017, 3:48 PM
The starting stars by two frnds
The starting stars by two frnds - avatar
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...
26th Nov 2017, 3:59 AM
Shiva Shrestha
+ 2
comment shows a block of code that wouldn't be compiled
25th Nov 2017, 3:56 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 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.
25th Nov 2017, 4:01 PM
dunfc
dunfc - avatar
0
comments is a additional text to explain or note some code.
25th Nov 2017, 3:53 PM
Momo Belia
Momo Belia - avatar
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?
25th Nov 2017, 4:15 PM
The starting stars by two frnds
The starting stars by two frnds - avatar
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.
25th Nov 2017, 5:28 PM
dunfc
dunfc - avatar
0
I think that there is not too much use of comments.. Am I right?
26th Nov 2017, 2:13 AM
The starting stars by two frnds
The starting stars by two frnds - avatar
0
Depends on the coder. I personally either forget or get bored to leave comments, which is a bad practice though.
26th Nov 2017, 3:16 AM
dunfc
dunfc - avatar