I sometimes want to run untrusted JavaScript, mainly for CTFs. It can be obfuscated JavaScript code or something like JSFuck. The point is, I know nothing about the code and just want to quickly see its output.
Of course, I don't want the JavaScript code to affect the other open pages/tabs. We can assume no exploit is available for the JavaScript interpreter/compiler/browser. Of course, I can do static analysis on the code, but that takes a lot of time and I may prefer to do dynamic analysis and just look at the output.
What's a good way to run arbitrary JavaScript code?