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.
allocation scheme is really nice ;-)
wmemset()
is clever, but it abuses the fact that Codewars runs on Linux. On Windowswchar_t
will be 16-bit, so theint
would be set to00 01 00 01
instead of00 00 00 01
I presume that we can having
null
prototype means being on top of the inheritance chain, hence the correct answer for that case would be0
, same as for plain{}
.Added an example test case for showing that.
It doesn't solve the possible issue of having null prototype object passing into the function though: Then what should it return? Would this case even be tested in the first place?
Thanks, updated random test.
Thank you for your note.
Added a clarification for that issue:
Added random tests, please check.
This is false:
Object.create(null)
is a thing, and the prototype ofObject
is also not a prototype ofObject
. In fact this is so commonconsole.log
will print[Object: null prototype]
for all of the above, and has legitimate use cases (e.gexpress
request.body
has a null prototype).This would also mean the kata's premise is flawed, and needs to be revised.
@rowcased, https://www.youtube.com/watch?v=PgsvWeaqqW4
I'm no expert at English, but I don't think it's syntactically or logically correct to ask how many . So, one might otherwise pose the question as either,
Which layer of inheritance are you on?
, or maybeHow many layers of inheritance have you reached?
.Thank you *dolayermroth
Thank you dolamroth, very cool
As a man of culture, you should name the kata "How many layers of inheritance are you on?"
Hi again,
Cheers
Hi,
A kata should have more random tests than just one.
Did you already dive into the authoring documentation? If not, you should begin there, to get a clearer idea of what has chances to get approved or not.
https://docs.codewars.com/authoring/guidelines/kata
Cheers