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.
if
xxx.match(/.../)
match nothing, the result should be a valuenull
.null
has nolength
.to improve this, I usually do this:
push((xxx.match(/.../)||[]).length)
EDIT: My bad, I read it wrong. I will mark up the issue again.
This comment is hidden because it contains spoiler information about the solution
Javascript doesn't enforce the use of caps for const like other languages may, ruby for example. However, there are a few JS style guides out there which define linting rules that are well defined. Google and Airbnb (https://github.com/airbnb/javascript#naming-conventions) are two examples of such guides.