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 - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -