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 have the same question and also diag1Sym, where is it from ?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
No problem, it's not very intuitive either, but every post you make is public unless you mark it as having spoiler content (even when commenting a solution).
Chrono79, oh, I don't know yet how exactly spoiler flags work, but next time i will use one :D. Sorry!
Use spoiler flag next time, please.
This comment is hidden because it contains spoiler information about the solution
{'0':'O','5':'S','1':'I'} is an object, let's call it symbolObj.
let symbolObj = {'0':'O','5':'S','1':'I'};
As you see, the map method will return symbolObj[a] or a.
So if a is 0, 5 or 1 it will be true and will return the correspondent symbol from the object. Otherwise, it will be false and the returned value will be a.
I'm beginner, so i don't know if i explained it very well but i hope i helped you.
Read this
I see where your confusion comes from, in sample tests
assertDeepEquals
is used and in random testsassertSimilar
is used instead.Changed it so all tests use
assertDeepEquals
.AFAIK Javascript tests are ok and aren't vulnerable to input mutation, so the problem must be in your code. Post it and mark your code as having spoiler content.
Just in case,
0
is neither positive nor negative.