Class syntex to define a constructor function is little bit confusing

Am confused…why should i set “const Vegetable = makeClass()” ? and why should the returned Vegetable == const Vegetable? if i set const veg = makeClass , the console throw an error!!!


Because you use Vegetable for class name, then you have not use this name set to another variable

i don’t understand. would you explain it please?

It’s for the benefit of the tests, you would just write a class without that wrapper IRL