How do we use multi-line comments in JavaScript?
Answers
Answered by
3
Answer:
Multi-line JavaScript comments are the same in purpose as single-line comments. However, the syntax varies a little. Multi-line comments in JavaScript start with a symbol: "/*" and when the comment ends, you use the symbol: "*/".
Everything between those symbols will be treated as comments in JavaScript. You can use multi-line comments for commenting bigger parts of code or commenting out while debugging, too.
Example
/* JavaScript code */
document.getElementById("test_el").innerHTML = "Some text";
document.getElementById("test_el2").innerHTML = "More text";
Explanation:
Similar questions