Wednesday, October 25, 2017

Executing JavaScript Code

JavaScript can be run in a Web Browser

For example, in Google Chrome

1) Start Browser

2) Press F12 to open Developer tools

3) JavaScript code can be entered and run from either the following tabs.

  • Console
  • Sources | Snippets

JavaScript can be run from Command Line (Terminal)

1) Install nodeJs

2) Create a js file, for example app.js

3) Run the js file

node app.js

Website hosted JavaScript REPL