Avatar

Level 3

Thanks for all the help. One more questions (at least about this topic!):

If I wanted to check a total of 6 arrays for matches how would I structure the rest of the code?

for (var i=0; i<Carlos.length;i++  ){

if(email.rawValue == Carlos[i]) {

    supemail.rawValue = "first.last@domain.com";
    }

    //does not equal Carlos so check the next array

        else if(email.rawValue != Carlos[i]) {
    {
         for (var i=0; i<Corey.length;i++  ){


          if(email.rawValue == Corey[i]) {


              supemail.rawValue = "last.first@domain.com";

    }

                    //does not equal Corey so check the next array

                       else if(email.rawValue != Ryan[i]) {
                   {
                        for (var i=0; i<Ryan.length;i++  ){


                         if(email.rawValue == Ryan[i]) {


                             supemail.rawValue = "everyone@domain.com";

}