JS is not converting Big Number to a string correctly

42 Views Asked by At

BTW, I get this number dynamically.


const obj = {
  id:24784909617760986
};


console.log(obj.id.toString()); // "24784909617760984"

I want to convert 24784909617760986 to "24784909617760986". How can I do this ?

I have tried to convert this number to a big int and then into a string but its not working correctly

0

There are 0 best solutions below