Hello,
I get that arrays are 0 based but why is arr.length = 5 and arr[5] = undefined?
const arr = [10, 9, 8 , 7, 6];
console.log(arr.length)
console.log(arr[5])
Hello,
I get that arrays are 0 based but why is arr.length = 5 and arr[5] = undefined?
const arr = [10, 9, 8 , 7, 6];
console.log(arr.length)
console.log(arr[5])
thank you for laying it out like that. Seeing that example made it make sense to me.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.