JavaScript > Introduction

Comment in JavaScript

How to write comment in JavaScript?


In previous post, we understood how to write JavaScript statement. In this post we shall learn how to write comment in JavaScript. 

The single line comment can start with “//” (double forward slashes) and multi-line comment should be wrapped inside “/*” (forward slash and asterisk) and “*/” (asterisk and forward slash) characters.

<script>
// Single line comment

/* Multiline comment

Line 1
Line 2
Line 3

*/
</script> 
 Views: 5809 | Post Order: 2



Write for us






Hosting Recommendations