I've noticed in my code that deleting array entries doesn't always seem to work.
Since I'm new-ish to arrays, I didn't want to assume this is a bug. If anyone has a moment to test this, I've attached a file that reproduces the problem.
It creates an array of random numbers (0-1). Then it scans the array for entries with the number 1, and deletes them. But it only deletes a few (it should delete them all), so it makes another scan, and deletes a few more (again, should delete them all).
If you open the console you can see the results. Refreshing it a few times shows the inconsistency
Note: There's an option in here to overwrite the array entry, instead of deleting it. Overwriting the entries works every time, but deleting the entry is inconsistent.
Thanks for any insight!
https://drive.google.com/file/d/11wroFtK9fc-pG82ruW2j4dWti96KhdEy/view?usp=sharing