JavaScript on command line with ChakraCore for macOS
$ js 1+1
$ js "2*3"
$ js 0xff
$ js "new Date().getTime()"
$ js "p(2); console.log(1);"
$ js `
for (let i = 0; i < 10; i++) {
p(i);
}
`
output to console (like printf)
same as consoel.log()
$ sudo cp js /usr/local/bin/
build ChakraCore
https://github.com/microsoft/ChakraCore
set LIBRARY_PATH on Makefile
$ make