简体   繁体   中英

Visual Studio Code [Javascript]

I want to run java script by using visual studio code. When I run script, visual studio code returned Code language not supported or define . I have Code Runner Plugin in visual studio code.

What does Code language not supported or define mean ?

在此处输入图片说明

You will probably need to start a web project to run the JavaScript in. I believe there are tools to use JavaScript as a console language, but this would require some extra setup. These scripts are intended to be executed by a browser.

Try this:

  1. Create a new web page project in Visual Studio.
  2. Add tags somewhere in the body of your HTML document.
  3. Paste your JavaScript into the script tags.
  4. When you launch the page, if you hit F12, you should be able to see your console.log output in the "Console" section.

Another option would be to use a site like JSFiddle. https://jsfiddle.net/

It will help you to have a basic understanding of CSS and HTML while learning JavaScript. W3Schools has some excellent beginner guides for HTML, CSS, and JS.

One option is to install Node.js .

Then open a terminal window and type node filename.js and it will execute the JavaScript.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM