Although it seems to work perfectly, I would be very grateful if it receives a more expertise eye because my IDE (WebStorm) is warning me in line 51, 57 and 58. It says that: “Possible iteration over unexpected (custom / inherited) members, probably missing hasOwnProperty check”.
I think I nearly understood what it means, but I don’t know why it’s appearing here because we’re iterating over an array, why I should check if the object that I’m iterating have one of the iterated properties? Does it really makes sense?
Also, any style and readability advices would be very appreciated!