Is there any way to evaluate a string of Javascript code using the NodeJS CLI tool?
For example, with Perl it would be perl -e "code", with Python python -c "code", with Ruby ruby -e "code", and with PHP, php -r "code".
Is there any flag with the NodeJS CLI tool to evaluate a string of code like this?
I have seen this question, but it does not help since I am not asking how to pipe scripts.