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.
Nice, didn't knew you can combine IIFE and Closure like that. I'll keep that in mind.
This is not best practice or clever since it uses outer/global scope to store a variable, and who knows what's happening outside there. It's like declaring your private list for a class
public
in Java/C#, which is bad bad bad.The canonical practice to emulate "private variables" in JS is to use a closure. See my solution.
names is in outer scope and even may be in global one...
^
gets it.