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.
Nahhh, even if they had used
Test.assertDeepEquals
, the kata will still be solvable, not sure how this one ended up to be updated to Node 18. only though......did Codewars use
chai
back in 2016 ? ... this kata is ancient and abandoned, there is no need to scold the author like that.no
This kata is unsolvable now (due to Node 18. being the only available version) because author does not know how to do object comparison using
assert
andchai
...what if num = 0
the return will -0
your solution not suitable
if number already negative then returning will be positive - * - = +
Yes, it works this way, and your answer would be 7. But it's not what the kata asks.
Wouldn't it be 7? -7 * -1 = 7. Or it doesn't work this way?
What if the input was
-7
?Hi. Could someone please explain to me why isn't it possible just to write an expression
return num * -1 ?
It doesn't work in JavaScript this way?
Just as I clicked submit, I envivisioned (as I usually do) what the one line solution would look like and just as I thought of abs(), here it is. Dammit.
works.
.
Is that so?
Poor guy, lol
Loading more items...