new array empty javascript code example Example: empty array javascript // set array arr = [1,2,4]; // empty array arr = [];