array assigment
array assigment
hi
Please take a look at this code:
-
var ar = [];
jQuery.each(form_array, function(i,n){
ar[i] = n;
});
callback_vars['form_array'] = ar;
Can I do this assignment without using the extra array ? like this:
-
jQuery.each(form_array, function(i,n){
callback_vars['form_array'][i] = n;
});
Obviously the solution above doesn't work, but the question still remains.
So, can I do this array asignment without using an extra array?