You should use this pattern Whenever your code will not be by now in an async operate or at the very best level overall body of a module. In other words, when you are just tests a bunch of code inside a js file and making use of applications like Stay Server, RunJs, or almost every other sort of JavaScript playground to observe the console window,