Created
November 18, 2018 08:42
-
-
Save ximing/7333694b6cc2bb217d114e99a8bed14c to your computer and use it in GitHub Desktop.
codewars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~~count === count || 0 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// 大数相加
function sumStrings(a, b) {
var res = '', c = 0;
a = a.split('');
b = b.split('');
while (a.length || b.length || c) {
c += ~~a.pop() + ~~b.pop();
res = c % 10 + res;
c = c > 9;
}
return res.replace(/^0+/, '');
}