Skip to main content
saved 1 byte
Source Link
Arnauld
  • 197.7k
  • 20
  • 179
  • 650

JavaScript (Node.js), 39 39  38 bytes

Saved 1 byte thanks to @Shaggy

s=>Buffer(s).reduce(map(p,c)=>p*10+cc=>p=p*10+c-48,0p=0)|p

Try it online!Try it online!

JavaScript (Node.js), 39 bytes

s=>Buffer(s).reduce((p,c)=>p*10+c-48,0)

Try it online!

JavaScript (Node.js),  39  38 bytes

Saved 1 byte thanks to @Shaggy

s=>Buffer(s).map(c=>p=p*10+c-48,p=0)|p

Try it online!

Source Link
Arnauld
  • 197.7k
  • 20
  • 179
  • 650

JavaScript (Node.js), 39 bytes

s=>Buffer(s).reduce((p,c)=>p*10+c-48,0)

Try it online!