IPhone : iterating though two arrays to output values

on Sunday, April 19, 2015

So I have two arrays a name array and a values array they are a string and double respectively. I want to be able for a user to type in a textfield and to iterate though the name array until there is a match then output the value that has the same number as the name to be outputted


this is the code i have:



for(var i = 0; i<name.count; i++){
if name[i] == typeFood{
yieldOutput == percent[i]

}
}

0 comments:

Post a Comment