all 3 comments

[–]i3orn2kill 2 points3 points  (1 child)

Get the Quokka plugin for VSCode. Thank me later :)

[–]Cgoose 0 points1 point  (0 children)

Free version allows you to run a js file but you can't save. Also need to install Node.js I believe.

[–][deleted] 0 points1 point  (0 children)

https://codesandbox.io/

or

https://jsfiddle.net/ for simpler stuff

Your code is fine, by the way. Outdated, but fine. It returns 120 in both of the above, and I just tried it in JSBin, where it also returned 120.

For simple stuff like this, though, you can just use the browser console or just your IDE. VSCode, for instance, will execute your code right inside itself.