I knew an object would fix this right up! Maybe I would have gotten something similar if I just persevered... Oh well, hindsight 20/20! This is one of the most clever solutions I have seen yet! I haven't done many coding questions, and I'm glad because I'll keep this one in mind as I complete them.
This is awesome. Didn't think there was a clean way of doing this without recursion!
This comment is hidden because it contains spoiler information about the solution
Sweet, even though I got the filter/includes answer, I was looking for one that used set as I was trying to use that first.
Oh wow, you're right. This is an even better solution than I first thought!
This is awesome, just need to add a check for humanYears === 0, I think.
I knew an object would fix this right up! Maybe I would have gotten something similar if I just persevered... Oh well, hindsight 20/20! This is one of the most clever solutions I have seen yet! I haven't done many coding questions, and I'm glad because I'll keep this one in mind as I complete them.