I have two different arrays - Name and Email in javascript. Values in the two arrays correspond to each other; Name[0] has email value at Email[0]. Values from array Name are used for a dropdown in the HTML page. Now when the user selects a name (dropdown) and clicks on Send button, email should be send to the person whose name is selected in the dropdown. How to lookup in the second array based on the value selected by User in the dropdown? Name and Email arrays will always have dynamic values
Thanks.