declare an array nodejs code example Example: declare an array nodejs var arr1 = new Array(); var arr2 = [];