0

Hey guys , why do we use "comment" command when it doesnt show it at all.

19th Dec 2016, 1:20 PM
Senpai
Senpai - avatar
7 Answers
+ 4
I use it a lot to remind myself of stuff I'm working on, and as a summary for later reference.
20th Dec 2016, 8:02 AM
Stefaan Doomen
Stefaan Doomen - avatar
+ 3
Imagine you have more than a 500 lines of code (which happens more than often) with no comments. There's no way u can find yourself when you want to bring changes to a certain function or script. If your let you code uncommented for say 10 days without touching it, when you try to get back to it, trust me, it'll be total chaos for you to understand what u've written. In addition, if you want to share your code without uncluding some comments as to what does what, people wont or a least will find a hard time to understand the way it functions. So yeah my friend, take it as a good habbit to add comments. I'm not saying that you comment every sigle line, but at least add an explanation here and there from time to time. (Or from a function to antoherˆˆ)
19th Dec 2016, 1:43 PM
CHMD
CHMD - avatar
+ 3
Commenting is a way that you can leave comments within your code without affecting the code itself. Commenting is also a convenient way to make code inactive without having to delete it entirely. in Html You can start a comment with <!-- and end a comment with --> in javascript you can comment on line with // or multiline with /* for start and for the end */
20th Dec 2016, 4:57 PM
Adnen Rebai
Adnen Rebai - avatar
+ 2
So that people know what the code is talking about and they can comprehend your code better.
19th Dec 2016, 1:49 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 1
Helps as a reminder of why you chose to do certain things at the time for when you come back to that piece of code days, weeks, months or even years later.
19th Dec 2016, 2:02 PM
Michael Haire
Michael Haire - avatar
+ 1
As developer it is good practice to add comment in your code. Comment's helps you to understand purpose of any method or any line in code
22nd Jan 2017, 12:09 PM
Sangram Patil
Sangram Patil - avatar
0
thank u guys
19th Dec 2016, 1:54 PM
Senpai
Senpai - avatar