In JavaScript, you can use comments for additional notes. Comments are of two types:
//
/* */
Use double slashes (//
) to comment. Everything after //
won’t be executed by JavaScript.
You can place //
comments anywhere, even mid-line:
Comments using /* */
syntax encapsulate any text between /*
and */
as a comment.
Multi-line comments can be written using /* */
.