Front End Libraries > Javascript Calculator Project

Good day everyone!

I just finished my calculator app, but ran into some difficulty passing some of the test. After adding a bunch of console logs to see what the tests were doing and even reviewing the tests themselves, I realized what was going on.

I had been assuming that the CLEAR would be used following a calculation expect in the case where User Story 14 was being tested. That assumption was incorrect and led to my issues.

I just thought I would make the following suggestion to revise the wording of User Story 14:

User Story #14: Pressing an operator immediately following = should start a new calculation that operates on the result of the previous evaluation.

Appending the following:
Pressing a digit or decimal will start a new calculation.

Again, just a thought. Maybe I should have known the intent was for a new calculation if an operator wasn’t pressed but since it wasn’t explicit I didn’t assume that was how the tests would work.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.