Search code examples
javascriptwebstorm

Is there an easy way to evaluate JavaScript within WebStorm?


Is there a way to easily evaluate arbitrary JavaScript code within WebStorm for testing purposes?

I'm tired of jsFiddle.net. I basically want a REPL within WebStorm but where I can also format blocks of code.


Solution

  • Well, you can get a REPL using webstorm's new Terminal functionality:

    enter image description here

    Press enter on "Open Terminal".

    Once you're in terminal, just enter node and then you get a REPL. This assumes that you have nodejs installed.

    However, if you want a REPL for the web, then I would suggest that you use Google Chrome's or Firefox's REPL.