Home >Development Tools >VSCode >Why can't I use multi-line comments in js in VSCode?
Why can’t I use multi-line comments for js in VSCode?
When you use VSCode to write JavaScript code, you can use multi-line comments. If an error is reported, That means your annotation is wrong.
Multi-line comments in JavaScript are written as follows:
/* 注释内容 */
For example, the following example uses multi-line comments to explain the code:
/* 下面的这些代码会输出 一个标题和一个段落 并将代表主页的开始 */ document.getElementById("myH1").innerHTML="Welcome to my Homepage"; document.getElementById("myP").innerHTML="This is my first paragraph.";
Recommended related article tutorials: vscode Tutorial
The above is the detailed content of Why can't I use multi-line comments in js in VSCode?. For more information, please follow other related articles on the PHP Chinese website!