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)
}