You just need to use node.js:
$ node > 1 + 1 > 2 >
Although this will not work for a regular browser element ( window , document ) and DOM. If you need a browser environment, check out the Phantomjs REPL and Casperjs - although I'm not sure about their capabilities.
source share