Since there is nothing to buy or install save maybe a text editor (I use Notepad++, which is free) you are ready to go.
Open your text editor, create an HTML document (a blank web page is enough), then write your script at the bottom of the body.
You can also write JS files as standalone but you cannot run them without Node.js and that has a learning curve.
If you are online all the time then try out REPL.IT (repl.it) which is free for public access. You can choose the language(s) you want to work in with each new REPL.