Build a JavaScript Calculator-help with test case

Tell us what’s happening:

I am building this app in React. While executing test pack, for test case number 10 I am getting both pass & fail. The functionality required by the test case works as expected - i.e. user is not allowed to input multiple leading zeros, so I am not sure what the issue is here. Any advice?

Link to codepen -

Error screenshot-

Link to the challenge:

Hi,
I checked the Chrome Inspector and saw this error:
Uncaught ReferenceError: exit is not defined at Calculator.keyClicked (pen.js:103)

Did you remember to define a var of exit?

Thanks @KoniKodes, that helped pinpoint the problem.

I had mistakenly used exit to break out of a switch statement :face_with_raised_eyebrow:

Have done the correction now and all test cases pass.

That’s wonderful @mgazge

I’m looking forward to seeing what you create next.