-1

I'm currently working on an algorithmic task with (relatively) big arrays and values in them. To be more specific, arrays have 100000 elements where all elements are integers and each element can be as high as 1000000000. So, the question is can JavaScript return wrong element on a given index or vice versa? I suppose so because as it revealed, it looses precision with integers multiplication and other operations after they grow higher than 10 to the power 18.

turisap
  • 231
  • 4
  • 13

1 Answers1

1

What is JavaScript's highest integer value that a Number can go to without losing precision?

No it won't return the wrong element. Indexes are irrelevant to the Math class

AthMav
  • 196
  • 1
  • 8