Environment setup in javascript

Online JS environment Some websites allow you to run JS code as well. e.g. www.jsfiddle.net

Browser JS environment

You can run JavaScript from browser's developer tools. All major browsers will provide the JavaScript console tool. You can execute the code directly from within the browser. For example - In Chrome, you can open the developer tools panel from any page by pressing ctrl+shift+J shortcut key. On Mac, you can press command+option+J key. Then you can go to console tab and start running the JS code.

Full featured IDE

Apart from this, you can also run JavaScript code from full featured IDE like Webstorm, VSCode (Visual Studio Code), Atom.
Complex problems, Simple Solutions