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.
Enabled in this fork
I passed 3 first tests but on the random tests i have this:
expected undefined to equal 49
Enabled in this fork
Fixed in this fork
Enabled in this fork
luckily I had some experience in backend before attempting this stupid kata
This comment is hidden because it contains spoiler information about the solution
For all who struggles: in tests there is moveBehavior what is reassigned, not moveBehaviour (note u).
This kata was a bit annoying. I think it could have been a 7 KYU
there is actually no need to save into variables the functions in our answers to these exercises, as we're not asked to then use them as parameters in higher order functions, so we can use a function expression, rather than a function declaration (plus, especially with the concise arrow syntax, we can use functions diretly as argumemts in other functions, or define and call them at the same time as an IIFE, eg. ((n)=> {console.log(n=5);}10); that logs 15)
Given that
rps
is a pure function and the fixed tests are exhaustive, random tests don't really serve much purpose other than to weed outunsafePerformIO
shenanigans. Nevertheless, I've added in random tests in a fork.Please approve Shell Translation
https://www.codewars.com/kumite/67025dce1bd1710b319b05eb?sel=67025dce1bd1710b319b05eb
Your code is not exactly correct, it's not a valid solution of a Codewars kata. See this article for some hints: https://docs.codewars.com/training/training-example#writing-a-solution
The code I wrote is correct. I checked it on VS and it runs smothly, but it still gives an error when testing with the sample tests. As a beginner, the fact that no kind of info is given to know more or less where to start is disssapointing.
yay
Loading more items...