0
Array.length: Why 2 instead of 3?
I found this quiz question: var arr = []; arr[0] = "x"; arr[1] = "y"; arr.key = "c"; console.log(arr.length) // 2
5 Respostas
+ 1
Martin Taylor
Thank you! I’ve changed the code as you suggested :
(null)
{"0":"x","1":"y","key":"c"}
https://code.sololearn.com/WDfnN326rhKu/?ref=app
+ 1
Martin Taylor Thank you so much for correcting me.