• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

263
Vistas
Number in Javascript changes after declaring it as a variable. Even parsing it from a string returns a wrong number

This is very weird please check it yourself.

Whenever I try to declare variable with the number 76561198322368902 it always changes to 76561198322368900 no matter what. Chrome Devtools Console Screenshot

Even when I pass the variable as a string and later parse to a number, it always changes to 76561198322368900.

I really don't know what to do. I never thought Integers were capable of such thing.

over 3 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

The "maximum safe integer" in JavaScript is 9007199254740991 - trying to use the number type beyond this can yield unpredictable results.

Use the BigInt type if you need a bigger number.

over 3 years ago · Juan Pablo Isaza Denunciar

0

You just exeeded the Number.MAX_SAFE_INTEGER

over 3 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda