if you use a large number in "alert" or "console.log", return an unsuccessful result. Example:
alert(999999999999999999);
Result:
1000000000000000000
But we have no problem on alert(999999999999999);oralert(99999999999999999999999999999);
alert(999999999999999);
alert(99999999999999999999999999999);
Since the maximum integer in js is 2 53 or 9007199254740992(see Jonathan Lonowski link, mentioned: What is JavaScript Max Int? ) Every number that exceeds this limit is no longer an integer, but a float.
9007199254740992
, . , , , - - . , alert console.log.
alert
console.log
Source: https://habr.com/ru/post/1541903/More articles:Google Play Game Services unlocks the achievement - keep the unlock in the game or unlock the call () every time? - javaIs this a good reason for non-polymorphic inheritance? - c ++How can I overcome race conditions in directives without a timeout function? - angularjsAndroid in-app purchase: how to consume? - androidHow to find the path to a font file in Java 7 and 8 - javaThe table displays well in html, but not in pdf format created with mpdf - htmlText.Html vs Blaze.Html - haskellRuby method search path for an object - ruby | fooobar.comFind macro refinement in a string - vbaFinding a method for singleton methods in a class in Ruby - ruby | fooobar.comAll Articles