Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Integer value and IN operator
Message
 
 
À
13/03/2016 04:58:02
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01632871
Message ID:
01632980
Vues:
45
>And a bit clearer, now, by adding a test function to the object (or to its class):
>
>
>item.hasDuplicateCenters = function(){
>	var hold = [this.prCtr1, this.prCtr2, this.prCtr3, this.prCtr4, this.prCtr5, this.prCtr6];
>	hold.sort();
>	for (var index = 5; index > 0; index--){
>		if (hold[index] != 0){
>			if (hold[index] === hold[index - 1]) return true;
>		} else return false;
>	}
>
>	return false;
>}
>
This is much clearer, thanks a lot. Going to test it on Monday.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform