0

cannot understand comment

the comment tag is not at all useful in output

23rd Nov 2016, 3:39 AM
Niladri Saha
Niladri Saha - avatar
6 Antworten
+ 4
a comment also helps other people understand what your code is doing when they read it
23rd Nov 2016, 5:20 AM
masterchief
+ 2
comments are to explain your code to the poor people that have to pick up afterwards. Assume that you will not be the only person reading your code, thus comments help to explain what it does and any complex areas. also after several pieces of code, you come back to one you wrote before and you'll be thankful you put comments in! Trust me :P
23rd Nov 2016, 8:18 AM
Alis Noire
Alis Noire - avatar
+ 1
it's not supposed to be in output. a comment is supposed to stop something from impacting output. //single line comment /*multiline*/
23rd Nov 2016, 3:45 AM
Unconformed
Unconformed - avatar
+ 1
There is more to programming than just output. If you are working on a project with a team, comments are very valuable for communication.
20th Dec 2016, 9:33 PM
Robert Jones
Robert Jones - avatar
0
ok thank u
23rd Nov 2016, 3:46 AM
Niladri Saha
Niladri Saha - avatar
0
in addition to what my colleagues have said,comments can also be use for checks and balances that why it's good practice to explain what a code or lines of code is meant to do, better still it's desired inputs and outputs
25th Nov 2016, 3:35 PM
Ayaah Silas