mercredi 27 janvier 2016

I need help to find an easy way for ( if else statement) please

Could anyone help me to find an alternative way for this (if else statement)?

    if(representatives.indexOf(word) == -1){  
        representatives.add(word);    

    }
    else if(repeatWords.indexOf(word) == -1){  
        repeatWords.add(word); }

Aucun commentaire:

Enregistrer un commentaire