What is the node.js equivalent of window[“myvar”] = value? February 22, 2023 by Tarik To set a global variable, use global instead of window. global["myvar"] = value