I have the following code:
var str = "0x4000000000000000"; //4611686018427387904 decimal
var val = parseInt(str);
alert(val);
I get this value: "4611686018427388000
", which is 0x4000000000000060
I was wondering if JavaScript is mishandling 64-bit integers or am I doing something wrong?
Question&Answers:os