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.
This comment is hidden because it contains spoiler information about the solution
you guys should remove this kata it broken i tried two solutions one in arrow fuctions the other with for loops (const getDivisorsCnt = (n) => Array.from({ length: n }, (_, i) => n % (i + 1) === 0).filter(Boolean).length;
)
(function getDivisorsCnt(n){
let result = 0
for (let i = n; i > 0; i-- ){
if (n % i == 0){
result++
}
}
return result
})
dosent work for either and these are litterally the only way to solve this problem im having the same max buffer problem as everyone else its not a code problem its a kata problem please fix this thank you
lmfaooooooooooooooooooooooooooooo
This comment is hidden because it contains spoiler information about the solution
i was so confused when i didnt put the const before invert because u usally dont have too lol, i was searching for help n now i wanna kys XD it was really tht simple just the const SMH
this is how i did mine i forgot the comma between the } and the ( and thought the codewars gods let me down but it turns out im just retarted XD
This comment is hidden because it contains spoiler information about the solution
huhhhhhhhhhhhh? lol
This comment is hidden because it contains spoiler information about the solution
The general structure of a Codewars problem is that the tests call your function with dfferent inputs and check that it returns the correct value.
This is for consistency (it would be bad UX if some Kata expected you to write to console, and others expected you to return a value, etc. The reason for this being the chosen format is that most langauges unit-testing libraries are structured like this, making test writing for most of them easier.
kayleighWasTaken thank you, so i was supposed to make it return a value with no input just a random number?
PowerShell translation
It said you were wrong because you are expected to return a value, not print to console.
nah didnt show evenorodd on mine could be mistaken though i was bashing my head into a wall for a while everythings hazy at the moment
yeah i checked the link thank you now ik but it still dosnt explain why when i put in my code it said it was wrong and also gave me no bug fixes like it shows in the examples the test code also said nothing about an even or odd fucntion its still very miss leading how can i do it there exact way if i the way they want me to model after isnt even anything similar to the final result lol its like a bait n switch
Loading more items...