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.
This comment is hidden because it contains spoiler information about the solution
it was still an issue, the point is to teach current best practices
was before es6
approved
JS version update
There are no tests with functions as prototype. So solutions which just check that
typeof proto === 'object'
pass.seems to work now.
are you sure ? I just passed it using Node v10.x
In the Information section, I think, there is some confusion between literals and primitives. A
String
literal like'abc'
is a primitive, and cannot be passed toObject.create()
. But this is also true of any string variable, i.e. any variable whosetypeof
returns'string'
:let str = String();
is also a string primitive and similarly cannot be used as a Prototype, despite the absence of a string literal in its definition.In modern JavaScript,
__proto__
is deprecated, and programmers are encouraged to useObject.set/getPrototypeOf()
insteadThis kata doesn't work with Node v10.x. Everything is either null or undefined.
Brilliant!
that's a good code
Loading more items...