What is the node.js equivalent of window["myvar"] = value?

What is the node.js equivalent of window["myvar"] = value?


To set a global variable, use global instead of window.

global["myvar"] = value