Comments in JavaScriptLike other programming languages, we can use Comments within our JavaScript code to for documentation or for easy understanding. Comments can be used before or after any line of code within the code.Note that these comments are to be used within JavaScript codes only and should not be used outside the script area or in our html areas. Single line comments we can place comment any where by adding // before the line. Here is an example.
We can place comments at the end of a line also.
Multiline commentsComments can be extended to multiline also. Like this .
Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
| ||||
More on Loops and Variables
| ||||