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.
I dont even know what to return? instructions very unclear
approved :]
Haskell translation
Good kata
Oh, you're right. I thought that was part of your code, because I saw you used a map :p This is actually an issue then.
Edit: node 8 disabled.
if you attempt function checkThreeAndTwo(array) {
return true
} on node v8 it throws you stderr.
There is no ?? operator in code above
Did you select node v18 at the top? If that doesn't fix it, maybe you modified sample tests?
Either way, you should include the actual error message, not just the line that caused the error. If I run your code with node 8, I get "SyntaxError: Unexpected token ?", which makes sense, because
??
didn't exist in earlier versions.Changed node version to 18 and problem is solved
I have stderr even if function is primitive and return constant value
STDERR:
/home/codewarrior/index.js:42
(map, x) => map.set(x, (map.get(x) ?? 0) +
done
Merged.
as reported below,
require set
is missing in the Ruby tests suite. fixed here, along with upgrading assertions to RSpec instead of the deprecated Codawars frameworksometimes one wonders what occurs within their own skull...
This is indeed best practice.
I don't think that requirement should exist to begin with. The original kata language is js so it's probably the usual fascination with coercion. If original language was java it would have been a method in a class instead.
It normally shouldn't. I assume that tests are weak, but I also don't understand the need for validating input. xD
Loading more items...