+ 1
if the comment doesn't appear in the browser then why do we need to add it to our project ?
comment box
4 ответов
+ 7
Comment is doing simple to reading the code .
If no comment in your code then it's to complicate for other to read .
Comments is just simple to understand any code , so it's important..
+ 3
To understand that what is going on your code so if other people are going to work on that file they can easily understand about the code or logics.
+ 2
David, write code and develop a website for a client. Maybe you have worked on some difficult code. Finish and sign off.
9 months later, the same client comes back to you with new requirements.
You accept and jump back into the project.
But, you NOW have difficulty understanding some of your code.
THAT is where comments come in.
You add comments into your code to remind you what the procedure does, what the result is , or what obstacles you overcame to make the specific piece of code work.
You'll never know when you have to revisit your old code, but you'll be glad that you commented inside it.
+ 1
To help anyone reading your code understanding it