declare global variable in node js code example Example: node.js save global variable global.number = 5;