Jquery, looping over arrays
问题 I'm trying to loop over an array. The array will be different depending on which option you have selected from a selectbox. I can't work out how to select which array to loop over. The bit that's not working is 'arrValues+thisId' inside the each loop. $('.guestLists').change( function() { var thisId = $(this).val(); var myCounter = parseInt(1); var arrValues0 = [ "", "", "", "" ]; var arrValues1 = [ "1", "1", "1", "1" ]; var arrValues2 = [ "2", "2", "2", "2" ]; // Loop over each value in the