JavaScript Calculator Project: Functionality feedback

JavaScript Calculator Project: Functionality feedback
0

#1

Hi all,

My JavaScript calculator is working… I think.

From what I can tell, it seems to meet all the required user stories and doesn’t throwing any weird bugs.

I was hoping to get another set of eyes to look it over and tell me if the functionality seems to be correct (any bug reports would be greatly appreciated!).

Here’s the live demos: https://joshamore.github.io/javascript_calculator/

The code is here: https://github.com/joshamore/javascript_calculator

No need to comment on the asthetics. I haven’t touched styling past what I needed to test the functionality (next mission).


#2

I think I’ve found a bug :slightly_smiling_face:

Try this sequence: ‘1’, ‘=’, ‘+’, ‘1’, ‘=’. The problem seems to be model.toEvaluate being null here.


#3

Awesome, thanks!

I fixed the issue by adding an if statement that makes sure two numbers are present.