Was this helpful?
in
This is the array membership operator. It is used in the "for loop" to loop through all of the elements in an array.
Example
For (x in myarray) # loops through each of the elements in myarray
Total = myarray[x].cost;
if (j in arr) # determines if arr[j] exists
total += arr[j];
Last modified date: 12/03/2024