Suppose I had an array such as:
myArray:Array = ['yes', 'no', 'yes'];
… how could I count the number of times that the values are found, i.e. yes=2, no=1 … in AS3??
_thanks all
Suppose I had an array such as:
myArray:Array = ['yes', 'no', 'yes'];
… how could I count the number of times that the values are found, i.e. yes=2, no=1 … in AS3??
_thanks all
thanks Jim - this did it!
run a for loop till the array’s length, have a counter variable that will get incremented each time the value of item of array = “yes”.
Thanks glad i could help.