Does it make sense to use HTML comments on blocks of JavaScript?

JavascriptObject Oriented ProgrammingFront End Technology

No, there is no need of using HTML comments on a block of JavaScript. This was followed in the 1990s. The browsers do not exist now, which wanted you to use HTML comments in JavaScript.

You can use CDATA,

<script charset="utf-8">
   /* <![CDATA[ */
   /* ]]> */
</script>
raja
Published on 27-Feb-2018 11:26:18
Advertisements