how to use javascript vscode code example
Example 1: type checking js vscode
//type checking all js files (vscode)
//in settings.json:
"javascript.implicitProjectConfig.checkJs": true
//also gives you ability to enable TypeScript features like auto-import on save
Example 2: how to run javascript in visual studio code
// install live server and then right click on your index.html and the keep the browser ready
Example 3: how to run js file in vs code
Simply open the .js file in question in VS Code,
switch to the 'Debug Console' tab, hit the debug button
in the left nav bar, and click the run icon (play button)!