Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
if you use function expression for that method you have to remember about hoisting
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It won't work with 'class' syntax for some reason.
You have to use the approach shown here: https://www.youtube.com/watch?v=gdjfsDlkH7A
This comment is hidden because it contains spoiler information about the solution
Can someone tell me what the error is?
Uses Object.defineProperty to get and set instance weight
Value is not what was expected
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.
If anybody's interested:
Nobody's going to change it now.
Why is there a
Cat
hidden in preloaded?This comment is hidden because it contains spoiler information about the solution
I've imlement this method (all test are passed). What does this test check? method typeof?? If yes, my code also passed sample tests, which are check method typeof too
seems pretty clear, doesn't it? :o
you have to define that
averageWeight
method, where appropriate for the current task.Loading more items...