what is JavaScript array in code example Example: array in js function Array() { return []; } alert(Array(1, 2, 3)); // An empty alert box