How would I turn Int 623527832412487691 to Str 623527832412487691 in JavaScript

48 Views Asked by At

Im trying to save 623527832412487691 to my MySQL database for use in the future, the MySQL type of data is a string

userid STRING NOT NULL,

However when I retrieve the data it outputs 623527832412487700 as a Number

I have tried

`${623527832412487691}` 

but that outputs 623527832412487700 as a String

I have also tried

console.log(BigInt(623527832412487691)) 

but that outputs 623527832412487680n as a BigInt

0

There are 0 best solutions below