var arr1 = Array.from({
length: 5 // Create 5 indexes with undefined values
},
function(v, k) { // Run a map function on said indexes using v(alue)[undefined] and k(ey)[0 to 4]
return k; // Return k(ey) as value for this index
}
);
console.log(arr1);