Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Integer value and IN operator
Message
De
14/03/2016 06:33:06
 
 
À
14/03/2016 05:40:59
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01632871
Message ID:
01633005
Vues:
59
>I think you should start with
>
>	var fetcher = 0;
>
>for this to start with 1:
>
>  		hold[hold.length] = this["prCtr" + fetcher++]; // love this writing!
>
I don't think so

>
>>
>>item.hasDuplicateCenters = function(){
>>
>>	var fetcher = 1;
>>	var hold = new Array();
>>	while (this.hasOwnProperty("prCtr" + fetcher))
>>  		hold[hold.length] = this["prCtr" + fetcher++];
>>  
>>	hold.sort();
>>
>>	for (var index = hold.length - 1; index > 0; index--){
>>		if (hold[index] != 0){
>>			if (hold[index] === hold[index - 1]) return true;
>>		} else return false;
>>	}
>>
>>	return false;
>>}
>>
>>if (item.hasDuplicateCenters()) errorMsg = resourceFactory.getResource('Messages', 'allDifferentProfitCenters')
>>
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform