Can you provide the link to the challenge rather than the category of the challenge? I tried to point to a challenge that I thought was the right one but wasn’t sure and reverted it (this is why your post has 2 edits, sorry bout that ;D)
Its about inheritance isnt it?
Object → Animal → Bird → Duck
Javascript searches from Duck going backwards to find which object is duck inheriting eat from. If eat is a property that was defined in Bird, Javasript stops searching otherwise it continues to Animal and to Object until it finds the object were eat is defined.
You might be talking about the common argument that “inheritance is bad”. This is mainly due to the fact the more you build on other code, it makes it harder to refactor later.
So for example, if you had an Animal class that had a method getLegs(), and you inherit it with a new class of Snake, suddenly getLegs() makes no sense. Thus requiring a refactor of the Animal class, which could affect all your other classes that were inheriting Animal!
This could be a major pain, and is usually why large amounts of inheritance can get really tricky really fast. At the same time if what your modeling makes sense and doesn’t change much (IE don’t assume all animals have legs!) it can still work well to model real world stuff