0
Javascript
i don't understand JavaScript Comments ? what does mean?
2 Answers
+ 2
Hi !
Comments in JavaScript are very simple.
There are two way to add a comment in JavaScript. The first one is the "one line comment" created with //
for example :
// this is a comment in JavaScript
The second way to add comments is by using multilines comments. This type of comments are created like that:
/* this comment
is on
more than one line */
Why are the comments useful ? Simply to make developper explain themeselves what are they doing in a part of they code. And when there are for example 1000 lines code comments shows to developper right way.
Hope this will help !
0
in short, because when i have a lot of strings, I can forget what i'm doing, right?



