JavaScript comments are used to provide context and improve the readability of JavaScript code. To avoid executing potentially problematic code while experimenting with alternatives, JavaScript comments can be used. Code comments can be added in two different ways in JavaScript; that are single-line and multi-line comments.  Single-line comment: “//” - it is used to insert single-line comments.  Example:  //This is a single-line comment
Multi-line comment: “/* */” is used for adding multi-line comments.  Example:  /* This
is a
multi-line
comment*/