We all know that +, Number()
and parseInt()
can convert string to integer.
But in my case I have very weird result.
I need to convert string '6145390195186705543'
to number.
let str = '6145390195186705543';
let number = +str; // 6145390195186705000, but should be: 6145390195186705543
Could someone explain why and how to solve it?