数组归一 reduce (数组归一) reduceRight(从右至左)
var addTwoNumbers = function(l1, l2) {
var e =
l1
.reverse()
.map((v, index, array) => v * Math.pow(10, array.length - index - 1))
.reduce(function(prev, next) {
return prev + next
}) +
l2
.reverse()
.map((v, index, array) => v * Math.pow(10, array.length - index - 1))
.reduce(function(prev, next) {
return prev + next
}) +
''
return e.split('').map(Number)
}

浙公网安备 33010602011771号