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.
BAD Performance
This comment is hidden because it contains spoiler information about the solution
Is the "x" value looping through all the letters from a to z and inside the every method it tries to find a letter that matches the "string" variable? If it finds a match then it returns the position of that letter and if it doesn't find a match then it will return -1? Also can I get feedback on my solution and let me know if there is anything I could improve?
This comment is hidden because it contains spoiler information about the solution
I'm new at this but I've been told the goal is to write code that legible to others. The idea being you'll (theoreticly) be working with other programers and they'll need to be able to follow your code and tell whats happening. That said, is it bad form? No clue. But I do think that the original answer by marutiborker is more easily followed than the long one-liner format.
This comment is hidden because it contains spoiler information about the solution
The kata description states that the function takes a boolean value. So checking the type is beyond the scope of this kata.
This comment is hidden because it contains spoiler information about the solution
Wow, this didn't even cross my mind. A real practical solution!
Beautiful, thank you for making me remember that .every() exists.
hahahahaha
brevity is the soul of wit!!!
This tastes like ice-cream.
The values undefined, null, NaN, 0, "" (the empty string) and of course 'false' are so-called "falsy" values. This means that upon being used in a boolean operation, they will convert to false. To some it seems intuitive, to others dumb and/or arbitrary. In the end, it is just how the JavaScript language works. You can find further information on the MDN website.
same answer but top 1 is you,not fair
Loading more items...