const parsed = parseInt(x, base); const parsed = parseInt('123', 10);Or unary +
const n = + '123';Its more compact but not as clear to readers. Probably best used by minifiers. In my tests, unary + assume base 10.
const parsed = parseInt(x, base); const parsed = parseInt('123', 10);Or unary +
const n = + '123';Its more compact but not as clear to readers. Probably best used by minifiers. In my tests, unary + assume base 10.