Calculator failing user story test, suggestions please

Hi Everyone, I can’t seem to pass all the tests currently or even more then 10. I know that my calculator should be passing more then what it is letting on. Can someone please help me with this project. I uploaded it to github to be checked out.

https://raregamer.github.io/fcc-react-calculator/

One small detail, when you convert the number to a fixed decimal (around line 299, if I cloned your repo correctly), you use finalNumber = numberValues[0].toFixed(4) - but that is setting finalNumber to a String and, if the string is 5.3200, then that is the value assigned.

Instead, try finalNumber = Number(numberValues[0].toFixed(4) ); - that does the same thing, but then forces it back to a number, removing any trailing zeroes.

Still looking for other issues. Long day, so my eyes is foggy. :wink:

Hi thanks for the tip. I changed it, but it didn’t help me on any of the user story test.

Checking if anyone is around to help me out with this today?

Hi all, does anyone have any suggestions or should I rebuild with the Eval method. I didn’t really want to use that method, though I would like to move on to last project to get my certificate.