This is done in order to help the user to interpret the code very easily.
<script> // It is single line comment document.write("hello Java Portal India Pvt Ltd"); </script>
In case of multiple line comment the single line comments can be added to it without any hassle. It is more convenient to use the multiple line comment. The multiple line comment is represented using the forward slashes with an asterisk and then the asterisk is followed by a forward slash. This comment can also be used before and after the statement.