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.
Same! I was working on it for about 30 minutes trying to get it to work. One google search for 'sort by number then alphabetically' and, lo and behold, a stack overflow suggesting the hallowed LocaleCompare. Good stuff.
Well, like I said. I've read the FAQ and that doesn't explain why I can't use a function constructor . Nowhere in the kata instructions does it say we aren't allowed to use a function constructor.
"This kata sucks, because my code works only on my machine" - hmmm, interesting approach.
Please read through this FAQ, you could find some helpful hints there. If you still have some specific problems, tell us about them.
This is the worst kata I've encountered thus far.
On my own personal machine, any expression i enter works including the ones they give you.
On here , it just returns an error.
I think this a failure on their part.
I kept getting the same thing and i console.log the inputs
and picked the biggest numbers they input and
i also put numbers waaay bigger in my function.
I did a console.time on my function and the results were coming back
in 10's of ms. The fastest was 3.283ms .
This is the kind of functional programming i am striving to learn how to write.
Super clever
Still a pure function because in order for it to be impure , it would have to access variables OUTSIDE of the function call...this function would always output the exact same thing if given the same input because there is no outside state effecting what happens inside the function...
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
right, Mine failed if i didn't account for both "language!" & "language !" . So, im guessing they updated the challenge
Note the style of how the punctuation marks are written in the description, they're apart of the word.
so, this doesn't actually work for all edge cases ...i dunno if they updated the challenge or not
i tried this pigIt('Pig latin is a cool language!') and the word "language" was left untouched .