Home > Development Tools > VSCode > 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
Release: 2020-02-10 14:38:04
Original
4133 people have browsed it

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:

/*
 注释内容
 */
Copy after login

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.";
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template