Although web and the node.js
library are the two main JavaScript environments, some pragmatic and adventurous users are finding ways to use JavaScript in the command line.
Using JavaScript as a Command Line Interface (CLI) scripting language might be one of the best opportunities to apply function programming. Imagine being able to use lazy evaluation when searching for local files or to rewrite an entire bash script into a functional JavaScript one-liner.