Saturday, August 11, 2018

javascript - why does $.each() not work with arrays that have a string index in jquery?

version a:





var x = [];
x['abc'] = 'd';
x['xyz'] = 'abbb';
$.each(x, function(i, el) {

console.error(el);
});






does not work. No output in console see here:



How can I make version a work?

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...