Node.js vm.runInNewContext() Method The vm.runInNewContext() method contextifies the stated contextObject, compiles the code written and runs it inside the context created and then after all this returns the output. However, the running code have no access to the local scope. Syntax: vm.runInNewContext( code, contextObject, options )
5 min read