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.
Yeah, you only ever need the last two cache entries.
That only works if the order of the keys maintains constant. This is not only not guaranteed within JavaScript, but has already been proven to cause issues earlier.
It might be a fluke that the solution you see passed when it was written. It's possible that an updated Node engine is more strict. I specifically expect an empty object with no keys if the input string is empty.
This comment is hidden because it contains spoiler information about the solution
Your code fails when dealing with an empty query string. Please read the output when submitting the code.
I don't know why it's failing on the example tests for me, but that used to work, and I haven't changed anything. I think it's a Codewars bug.
This comment is hidden because it contains spoiler information about the solution
Thanks. Changed it :)
global subscribed ? :)
There is bug in tests, check my solution, if you create second Event object (e2=new Event;) it will get the same "private" data as first one. Btw is there any way to keep .prototype syntax and not get such behaviour ?
This comment is hidden because it contains spoiler information about the solution