Hello, everyone! I have nearly finished the calculator project, but I am stuck on how to fix the decimal operations. For instance, when I try and add two decimal numbers together, I get a rounded number. I cannot seem to find where this is happening. I posted once before about this, but so far no one has responded(after a week). If anyone can help, I would deeply appreciate it!
Here is the link to the codepen:
Thanks!
You are using parseInt()
to convert string to number - it returns integer.
Try to use parseFloat()
instead.