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 think the callback makes the code is longer
What I like about this solution is it fixed the inherent bug of Truthy vs Falsy and evaluates the actual input.
As a newbie in js, i truly think this solution makes more sense!
Maybe your result has some leading or trailing whitespace?
Did you succeed?
This comment is hidden because it contains spoiler information about the solution
This is not a problem of the kata. Did you try several times? Maybe CW was too busy??
Javascript
Which language?
Am I missing something here?
Expected: (A : 200) - (B : 1140), instead got: (A : 200) - (B : 1140)
Expected: (A : 0) - (B : 1290) - (C : 515) - (D : 600), instead got: (A : 0) - (B : 1290) - (C : 515) - (D : 600)
So it's easier to compare
(A : 200) - (B : 1140)
(A : 200) - (B : 1140)
(A : 0) - (B : 1290) - (C : 515) - (D : 600)
(A : 0) - (B : 1290) - (C : 515) - (D : 600)
Very nicely done.
In this case there is absolutely no difference between
===
and==
, becausen % number
will always return a number.Good point.
Your solution uses
==
for all of the comparisons, while this uses===
.