Running JS files on VS Code

View > Extensions

Search for “Code Runner”

make sure you install, then reload to activate the extension

in your js file, right click, then choose “Run Code”