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.
Wow, very good solution! A bit verbose, but definitely better practice imo.
The reason is: people voted it as Best Practice.
This comment is hidden because it contains spoiler information about the solution
Probably a CodeWars issue then, not a kata issue.
this === ""
and
Boolean("") === false.
So why does Boolean(this) === true?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Ah. A polyfill was added in the test cases of this Kata.
Object.values
isn't available normally.That's odd it doesn't work for me when running test cases, but submitting works fine. I'll try to find out what's going on there. Now I understand why someone else's solution polyfilled
Object.values
(-2) * 2 = -4
-4 - 2 = -6
I don't think there is any problem with it. :)
This comment is hidden because it contains spoiler information about the solution
This is a great solution, I wonder why it's not passing in codewars.
I just copied and pasted this answer and it doesn't work for me.
ERROR:
TypeError: Object.values is not a function
at cannonsReady
at begin
at Test.it
at /runner/frameworks/javascript/cw-2.js:241:21
at Promise._execute
at Promise._resolveFromExecutor
at new Promise
at Test.describe
Weird. I've tried your solution and I didn't have any problems with 'final submit'.
This comment is hidden because it contains spoiler information about the solution