Line 48: Next a function is created which will add a segment to the faders array.
Line 49: An IF statement is used to check if "addSegmentNow" is true
Line 50: Another IF statement is used to check if the container array is above 0. We remeber this array was populated
Line 51: A random number is set to "ranRow" variable, ranging from 0 to the curent total of items in the container array.
Line 52: The item is then placed inside the faders array
Line 53: And then removed from the container array.
Line 54: If the conainer array doesn't contain anything...
Line 55: addSegmentNow is set to false, essentially stopping this function from doing anything. |