How to do comment in JavaScript
How to do comment in JavaScript
It's divided into 2 parts:
Single line Comment
Multi line Comment
Let us know something both of them with example.
Single Line Comments:
Single line comments start with //
Text between //and the end of the line will be ignored by JavaScript.
Example:
// used to comment any notes, variable, function, objects etc.
var raj = 10;
var raj = 10; // Raj variable created
Multi Line Comments:
Multi line comments start with /* and end with */
Any text between /* and */ will be ignored by JavaScript.
It is mostly used to comment to any function and class.
Example:
/* In this code we passed argument,
function, class, object of people and
it will be call to another school */
Tags:
JavaScript
0 comments
Please leave your comments...... Thanks