array from variable javascript code example
Example 1: return array javascript
function func() {
return [5, "string", {a: 7}];
}
Example 2: array in js
function Array() { return []; }
alert(Array(1, 2, 3)); // An empty alert box
function func() {
return [5, "string", {a: 7}];
}
function Array() { return []; }
alert(Array(1, 2, 3)); // An empty alert box