Returning inconsistent datatypes is not a best practice. [] is a perfectly good return value; there is no need to return an empty value instead of an empty array.
[]
Don't make the same mistake Array.prototype.match makes!
Array.prototype.match
No random tests
Duplicate of many filtering katas. For example
Loading collection data...
Returning inconsistent datatypes is not a best practice.
[]
is a perfectly good return value; there is no need to return an empty value instead of an empty array.Don't make the same mistake
Array.prototype.match
makes!No random tests
Duplicate of many filtering katas. For example