jquery - Does $.each() execute for one item? -


will jquery method $.each() execute if there 1 item in array?

at least me, isn't.

yes will. example.

var 1 = [1];  $.each(one, function(index) {     alert(one[index]); }); 

will alert 1


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - How can I echo out this array? -

javascript - IE11 incompatibility with jQuery's 'readonly'? -