-
for loop Array
Hey Guys,
I’ve seen a few versions of this but not the way I want to use it and struggling to tweak it to work.
I have two arrays.
j = [“BL”, “CF”, “LS”]
k = [“Bristol”, “Cardiff”, “Leed”]I want a for loop to go through the Array and if the indexOf matches my compname it returns the other arrays value.
Example
Compname = BL-TEST
The array will find it is j[0];
and will return k[0];I can’t seem to get this to work at all.