Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   Graphic Design (http://siteownersforums.com/forumdisplay.php?f=23)
-   -   Java script (http://siteownersforums.com/showthread.php?t=204389)

thevyakar 11-07-2017 02:14 AM

Java script
 
What are the types of javascript comments?

Vincy 11-07-2017 10:44 PM

JavaScript comments can be used to explain JavaScript code, and to make it more readable.
JavaScript comments can also be used to prevent execution, when testing alternative code.

kvd1216 11-08-2017 02:13 AM

Single Line Comments
Single line comments start with //.
Any text between // and the end of the line will be ignored by JavaScript (will not be executed).

Multi-line Comments
Multi-line comments start with /* and end with */.
Any text between /* and */ will be ignored by JavaScript.

Using Comments to Prevent Execution
Using comments to prevent execution of code is suitable for code testing.
Adding // in front of a code line changes the code lines from an executable line to a comment.

thevyakar 11-10-2017 03:13 AM

Thanks For sharing your knowledge. :)


All times are GMT -7. The time now is 02:35 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.