Super simple - I'm running a useEffect function in React. I need to do a simple calculation, but I keep getting the wrong answer.
Example, I get 10
as an answer instead of the expected 8,960...
I thought it might be a string and not an Int at first, but it made no difference.
const price = 5.58;
console.log(price); // returns 5.58
const money = 50.00;
console.log(money); // returns 50
const dev = parseInt(money) / parseInt(price);
console.log(dev) // returns 10 ???.
I expected it const dev
to return 8,960573476702509
but it returned 10