# What is the difference between comments /*...*/ and /**...*/ in JavaScript?

JavascriptWeb DevelopmentFront End Technology

/*…*/ and /**…*/ are multi-line comments. The following is a multi line comment in JavaScript.

/*
* This is a multiline comment in JavaScript
* It is very similar to comments in C Programming
*/

The following example shows how to use multi-line comments in JavaScript.

<script>
<!--
/*
* This is a multiline comment in JavaScript
* It is very similar to comments in C Programming
*/
//-->
</script>

The comment /** */ is for  PHPDocumentator ,  which is used to make automatic documentation.

Published on 09-Jan-2018 14:17:47