Nice! Definitely think that's the easiest way to do number 1. Zip also makes sense for the second, though not using it allowed me to do the early return!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.