When utilizing strings as keys in an array, the console
does not display these declared values when iterating through them, even though the values can still be accessed.
>> var arr = [ 0, 1, 2, 3 ];
undefined
>> arr["something"] = "aught";
"aught"
>> arr
[0, 1, 2, 3]
>> arr["something"]
"aught"
>> for( var i = arr.length; i--; console.log( arr[ i ] ) );
3
2
1
0
I've come to understand that arrays are essentially objects with a built-in 'enumerate' interface within JavaScript's engine.
What's most intriguing is that the interpreter doesn't throw any warnings or errors, leading me to spend time searching for where the data could potentially be lost.