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.
Be aware that using
this
in this context will pollute the scope of the callsite (i.e. the global namespace). As these variables are working properties of this function they should be lexical variables.You should cache the regex literal.
I feel like the Math.abs(integers[n] % 2) should be in a seperate function. I posted a similar solution but using the Array builtins.
This would be slow for large collections due to filtering the array twice.