I have a simple problem with array, i can’t solved.
Example : http://jsfiddle.net/8jyUT/
Why second console.log can’t display the array correctly ?
(I’m on Chrome)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s logging the array but it seems empty, because you didn’t populate it numerically ( which is how arrays should be populated ). You can still access the
nameproperty of the array,in JS, Any object can have properties, and arrays are objects. If you have no use for numerical ordering for the
albumnor any of the array methods, then use an object and not an array: