Home  >  Article  >  Development Tools  >  Why can’t I use multi-line comments in js in VSCode?

Why can’t I use multi-line comments in js in VSCode?

angryTom
angryTomOriginal
2020-02-10 14:38:044015browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How vscode runs vue codeNext article:How vscode runs vue code