I have an array of 7 elements: var myArray = [0, 0, 0, 0, 0, 0, 0]
I randomly flip these 0's to 1's during processing: var myArray = [1, 0, 0, 1, 0, 1, 1]
My question is, how do I get one of the elements that are still zero at random? For example, I want the system to be able to take that second array above and randomly choose index 1, 2, or 4.
This has had me stumped for hours, any help would be appreciated!