I have this code below:
let n = 100n;
let x = 0.1;
console.log(n/x); // Throws error
Error:
TypeError: Cannot mix BigInt and other types, use explicit conversions
How do I divide a BigInt
by a decimal value in JavaScipt?
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
I have this code below:
let n = 100n;
let x = 0.1;
console.log(n/x); // Throws error
Error:
TypeError: Cannot mix BigInt and other types, use explicit conversions
How do I divide a BigInt
by a decimal value in JavaScipt?