Java script
What are the types of javascript comments?
|
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. |
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. |
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.