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.
My error is slightly different ("expected 1 to equal +0"). Maybe i'm not framing my question correctly. Can you explain why assert.strictEqual(findUniq([0, 0, 1 ]), 0) should equal 0 and not 1? My code is returning 1 which I understand but how is this not correct?
NunoOliveira, could you elaborate on how the unique value is still expected to be zero even when there are multiple of those values?
Node
, and not any webbrowser's. Test inNode
( and preferably the correct version for the kata ).This comment is hidden because it contains spoiler information about the solution
It's better to provide a complete code and correct code, otherwise one needs to guess what's missing.
This only checks if one of
a
orb
is not alphabetic, which is the condition for returning-1
.This comment is hidden because it contains spoiler information about the solution
I totally agree. Once I started writing the steps down, I realized it was far less complicated then I initially thought.
Slightly trickier than the usual level 8. Hint: One line... Don't overthink.