<script> document.write(5 + 6); // Returns the sum of 5 and 6 </script>
// next to each other, and you can stop the execution of that code by placing these two side-by-side slash marks in front of a code snippet. Since that line will enter into the comment line, that code will no longer work and will not print anything on your screen.
If we want to include more than one line in the comment tag, we can use the multi-line comment tag by putting one mark at the beginning and one mark at the end of each line without placing two individual side-by-side slash marks. In this way, since the code snippets in it will appear as comments, they will not print anything on the screen and will become inoperable.
In the code snippet above, we used
* / star to the place where we want to close the multi-line comment tag, then slash it and we have now converted the remaining part of these two tags into the comment line.
Comment tags are usually one-to-one to use when you write a code and don’t want it to work at the moment, or to indicate why you’re writing it, why you’re writing it, what you’re doing. Sometimes it can be used to tell what you use where and for what purpose when you send the code to another person. But in general, the purpose is to look at the future when you look at your code why you do this or why you need to add something here later, reminding you, never appear on the screen, and therefore we need a label that only source code.