Avatar

Correct answer by
Level 6

Hi,

1) if(email.rawValue = 3dClos[x])

      you are making assignment instead of equalization, replace it with

     if(email.rawValue == 3dClos[x])

2) var x; is not initialized ithin you have to make loop like this:

var 3dClos = new Array("first.last@domain.com","firs.las@domain.com","fir.la@domain.com");

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

if(email.rawValue == 3dClos[i]) {

    supemail.rawValue = "correct.email@domain.com";
    }
    else
     {
      supemail.rawValue = "";

     }

}

BR,

Paul Butenko

View solution in original post