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.
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 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
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 .