0

Can someone explain why converting the String "948226952292454401" to a Number fails with all JS methods like Number, parseInt, Math.floor, etc.?

It always returns 948226952292454400.

var string = "948226952292454401"
console.log(Number(string))
console.log(parseInt(string))
console.log(parseFloat(string)) 
console.log(Math.floor(string))
console.log(Math.ceil(string))
console.log(+string)
rx2347
  • 1,071
  • 1
  • 6
  • 26

1 Answers1

-2

Max value largest possible positive numbers that JavaScript can work with.