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.
Hard to know without actually seeing your code. State the language, paste your code using proper markdown and mark your post as having spoiler content.
Use spoiler flag and proper markdown when posting code.
In your first code,
count
is a string. You're not properly counting the n's in the string.In the regex it'll only match 15 n's one after the other, so it won't work either unless they are all next to each other.
That's not how you tests if a number is NaN, it won't work that way. Read this