where does javascript run code example
Example 1: how javascript works
JavaScript is what is called a Client-side Scripting Language. ... Inside a normal Web page you place some JavaScript code (See How Web Pages Work for details on Web pages). When the browser loads the page, the browser has a built-in interpreter that reads the JavaScript code it finds in the page and runs it.
Example 2: how to run js script
$ node // now we can execute code in console
> 2 + 4 //our input
6 //output
> .exit // or ctrl + c