1.

Explain two types of comments in JavaScript.

Answer»

there are two kind of comments in JavaScript: 

Single line and Multi line comments. 

1. single line comment begins with two forward slashes // this is a single line comment 

2. Multiline comments begin with /* and ends with */ 

e.g., /* this is a multiline comment and may continue across multiple lines */ comments are ignored by the interpreter and are not executed.



Discussion

No Comment Found

Related InterviewSolutions