I like your answer. You should have used an arrow function to have a one-liner :)
Thanks for noticing my do-while solution. About the "$valid" variables maybe you are right, but I was having fun :)
A do...while loop? Nice. Only thing is, I would not create those extra "$valid" variables here, except for maybe $validBounce, which might be easier to scan.
Loading collection data...
I like your answer. You should have used an arrow function to have a one-liner :)
Thanks for noticing my do-while solution.
About the "$valid" variables maybe you are right, but I was having fun :)
A do...while loop? Nice.
Only thing is, I would not create those extra "$valid" variables here, except for maybe $validBounce, which might be easier to scan.