I'm having a hard time understanding this code. Could someone try to explain why an array can have elements and 0 length?
var myArray = [];
myArray["hello"] = 4;
myArray["world"] = 65;
$('#btn').on('click',function() {
console.log(myArray.length); // Prints 0
console.log(myArray); // Prints [hello: 4, world: 65]
console.log(myArray.length); // Prints 0
}