There are two ways to run JavaScript in WebStorm: 1. Run in the console; 2. Use "Run/Debug Configuration". Detailed steps: 1. Console method: Create a JavaScript file and enter the code, press the shortcut key to run; 2. "Run/Debug Configuration" method: Right-click the JavaScript file, select "Run/Debug Configurations", and click "Node. js" and enter the file path, click "Run".
How to run JavaScript in WebStorm
There are two main ways to run JavaScript in WebStorm:
1. Run
*.js
).Ctrl
Shift
F10
, orCmd for Mac
Shift
F10
).2. Use "Run/Debug Configuration"
Detailed steps:
1. Console method:
.
console.log("Hello, World!");
Shift
F10(## for Mac #Cmd
Shift
F10
) Run the script.
The console will output:Hello, World!
Right click
Select "Run/Debug Configurations".
Click "Run".The above is the detailed content of How to run js in webstorm. For more information, please follow other related articles on the PHP Chinese website!