Browser
Well any JavaScript code only need a JavaScript Engine to run and every browser have one.
Simply open any browser and press Option + ⌘ + J
(on macOS), or Shift + CTRL + J
(on Windows/Linux).
And you'll see console has opened.
Now paste (or write) the code and press Return
(on macOS), or Enter
(on Windows/Linux).
NOTE: Only recommended for quick and small code snippets.