This is a very outdated thread, many of the answers are incomplete and/or simply don't work. The way to run JS in shell (regardless if you're using windows or not), is to use Node.js. After you have installed Node, you use it from command line, like this:
$ node> console.log('Hello, world');Hello, worldundefined> .exit
or from a file:
$ cat hello.js#!/usr/bin/nodeconsole.log('Hello, world');$ ./hello.jsHello, world
Or from node itself:
$ node hello.jsHello, world