How can I convert BigInt to float in js?

Viewed 613

Lets say I have a BigInt(66555444333222111) and I want to convert it to float loke the output will be 6.6555444E9.

1 Answers

You can use the following example:

console.log( Number( BigInt('66555444333222111') ).toExponential() )
Related