What are the ways of commenting a code or a statement in JavaScript?

 Posted by vishalneeraj-24503 on 1/13/2014 | Category: JavaScript Interview questions | Views: 1758 | Points: 40
Answer:

We can use double forward slash(//) for single statement or line comment

For Example:-
//var name = 'Vishal'; 


We also have multi-line comments as
/*

var name = 'Vishal';
var surname = 'Kumar'
var address = 'Pune';
*/


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response