how to get data from array with js code example Example: array in js function Array() { return []; } alert(Array(1, 2, 3)); // An empty alert box