Use Object.defineProperty to write custom setters and getters
This might have been the (only solution?) norm when this kata was created, but now that JavaScript has a proper class syntax with getters and setters, forbidding the use of modern language features is ridiculous.
Add one more test - set
felix.weight
second time and check average. This will surely show some broken solutions.This might have been the (only solution?) norm when this kata was created, but now that JavaScript has a proper class syntax with getters and setters, forbidding the use of modern language features is ridiculous.
Why is there a
Cat
hidden in preloaded?