[Solved] what is wrong with this IF satemenet [closed]

[ad_1]

A more elegant solution :

if( ["CheckBox", "Radio-Button", "Payment-Gateway", "Message", "Award"].indexOf(data) == -1){
    // data isn't any of these words
} else {
    // data is one of these words
}

1

[ad_2]

solved what is wrong with this IF satemenet [closed]