function sumBigNumber(a, b) {
var res = '',
temp = 0;
a = a.toString().split('');
b = b.toString().split('');
while (a.length || b.length || temp) {
temp += ~~a.pop() + ~~b.pop();
res = (temp % 10) + res;
temp = temp > 9;
}
return res.replace(/^0+/, '');
}
网友评论