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.
After solving the kata I can say: by removing them...
How are we supposed to take in account leading zeros performing integer addition??
I disagree with the comments that this kata offers no value because there's 2 similar ones. It teaches you how to deal with more than 2 numbers which those other two don't. However, what I did take issue with was the useless output messages, doesn't even show what the expected result is! For the extremely inconvenient annoyance of that, this gets a NONE vote from me.
Now it's too late.
Test.assertEquals
should be used instead ofTest.expect
, and ideally Node 10 +chai.assert
.It's also trivial in JavaScript, unless you block
require("bignumber.js")
.It's about time that I learn how to deal with big integers in Javascript. Can anybody point me in the right direction for learning the best way?
I'm not asking anyone to solve this for me, just point me in the right general direction for learning how to deal with very large numbers in Javascript.
Hehehe, I know. I used the same solution in the following katas too :
https://www.codewars.com/kata/sum-strings-as-numbers/javascript
https://www.codewars.com/kata/525f4206b73515bffb000b21
Almost a duplicate: https://www.codewars.com/kata/sum-strings-as-numbers/javascript
I think the added value is minimal and different from the essence of the kata.
I pasted my code from that kata literally, and the difference was expressed in one line of code that had nothing to do with summing big integers !?
Hi there, I don't understant that when I return a number as the result, it lets me pass the test eventhough it says that 'result must be a string'??
Done
Random tests are hidden from others.
Needs random tests. Also use Test.assertEquals instead of Test.expect.
See the new CodeWars Codex
I agree the comments. Too few tests also! Javascript is another thing with big integers.
This kata is trivial in Python (and will be in Haskell, Ruby, Java, C#), since Python has arbitrary large integers. It's far more difficult in JavaScript and CoffeeScript though.
I strongly suggest to remove the Python variant, as it spoils the kyu rating.
Loading more items...