JavaScript Multi-line Comment Example

A multi-line JavaScript comment beginning with forward slash and asterisk (/*), and end with the reverse asterisk and forward slash (*/).

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>JS Multi-line Comments</title>
</head>
<body>
<pre>
<script type="text/javascript">

        /* 
            JS to write on body section
            1st: Simple write
            2nd: write text an <h2> Heading
        */
        document.write("Hello World!");
        document.write("<h2> Hello World! </h2>");

</script>
</pre>
</body>
</html>

Run it...   »

Example Result