Discuss / JavaScript / ans1

腾腾2318

#1 Created at ... [Delete] [Delete and Lock User]
return s.split("").map(function(x) {return x.charCodeAt() - '0'.charCodeAt()}).reduce(function(x,y) {return 10 * x + y});

  • 1

Reply