We need to sum big numbers and we require your help.
Write a function that returns the sum of two numbers. The input numbers are strings and the f...
For further actions, you may consider blocking this person and/or reporting abuse
Typescript includes tests
github.com/kiliman/dev-to-daily-ch...
Test
There's a
BigInt
type in vanilla javascript, why not just use that instead?BigInt isn't supported for this one. There was another kata that was multiplying big numbers by a different author and they allowed it, but I guess that's not the route they wanted folks to take.
A simple oneliner in JS:
Can't you just do that with jQuery?
Python for arbitrarily large numbers represented as strings:
Java
Here is the simple solution with JavaScript:
Swift function :
And with a closure :
Isn't
Int
a sized integer? It won't work with numbers that don't fit in 64 bits (or 32 bits, if you compile it for 32 bit architectures)Javascript
Rust:
A more cool JS solution:
Ruby:
JS
python