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.
My exact same solution <3
I have never heard of hasOwnProperty method before, this is so great thansk you. I have learnt sth new today
You must also aware of how in operator works because it is not only work on its parent object it is also works on object prototype chaining so let's say that property name already exists in object prototype then it will generate bug to your code
instead hasOwnProperty, i would use next exspression: if(string[i] in result);
This comment is hidden because it contains spoiler information about the solution