Breaks away from Ruby rendition semantics in order to better adhere to modern JS idioms

- no longer augments the `Array` prototype.
- assignments early in function.
- simple while loop.