Inside "myFunction", I have an each()
iterator which finds the height of certain elements. How can I assign each height value to an incrementally generated variable name, accessible outside the each loop?
function myFunction(){
$('#div1, #div2 ... #divN').each(function(index){
/* Increment variable name here */ = $(this).outerHeight();
});
// Also use those variables here
};
Thanks.