The multiline comment can be used to add single as well as multi-line comments, so, it is more convenient. Multiline comments are starts with a forward slash with an asterisk(/*) and end asterisk with a forward slash(*/).
Use comments to prevent JavaScript Code Execution:
If you want to add another code while working in the same code document, then you can use comments. You can comment on the previous code and add the alternative code to test it. After completion of the testing, you can uncomment the previous code. In this way, you can test both the codes using comments.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok