method indexOfValueInRange

int32 indexOfValueInRange(value aValue,int32 idx1,int32 idx2);

Argumente

Zurückgegebener Wert

This method returns the matching index of the specified value in between the specified starting (idx1) and ending index (idx2) within the array. -1 is returned if no match found.

var arrayObj = shell.serviceManager.basics.array;
arrayObj.addValue("a");
arrayObj.addValue("b");
arrayObj.addValue("c");

//this will return -1
var idx = arrayObj.indexOfValueInRange("c", 0, 1);

//this will return 2
idx = arrayObj.indexOfValueInRange("c", 0, 2);