How to do multi line comment in JavaScript

I want to do multi line comment in my code. Which symbol is used for it?

Your Answer

Multiline comments are used for large text descriptions of code or to comment out chunks of code while debugging applications. Comments are ignored by the compiler.

Multi-line comments, are long-form annotations used to introduce and explain a section of code. Often these types of comments are placed at the top of a file, or before a particularly complex code block.
exp: greet.js
/* Initialize and invoke a the greetUser function to assign user's name to a constant and print out a greeting. */ function greetUser() { const name = prompt("What is your name?"); console.log("Hello ," + name + "! How are you?"); } greetUser();

You may also sometimes see a slightly modified version of the block comment syntax, which starts with /** and includes asterisks throughout the left side of comment block.

Javascript

Didn't get the answer.
Contact people of Talent-Javascript directly by clicking here