Comments can be added to explain the javascript or to make javascript more readable.
Single Line Comments:
Second line of the code shows how to comment a line using // symbol.
Multiple line comments:
This code used mutliple line comment method in Javascript.
One more important thing we have to
remember before writing a professional javascript is to use an HTML
comment tag (end
comment) after the last javascript statement. Because browsers that do
not have support for javascript will display javascript as page
content. To prevent this as part of javascript , the html comment tag
can be used to hide javascript.
No comments:
Post a Comment