Message from JavaScript discussions

April 2019

— I'm good thanks


But we don't want to specify these three explicitly, there should be a common interface and the program should "know" which animals have mouths

— And can therefore talk

— This does the same basically

— And then we need a special case for animals that have mouths, but can't talk

— Like fishies

— Just with the first you can do Animal.brain

— With this youll need Animal().brain

— Thats why using animals is a stupid example lol

— So is there a need for a constructor in this case or not?

— Its useful to explain the concept

— No need