Uh...oops? My JS Calculator

I just finished making my JS Calculator without realizing I didn’t use any actual JS. Do I need to go back and re-build my app so that it is using JS?

1 Like

looks good :slight_smile:
kewl idea with the html too !

the challenge is about javascript tho heh

1 Like

Thanks! Technically I met all the requirements, the calculator works! Haha

wow I can’t even imagine tackling this without JS. I think I’m impressed

1 Like

Of course you are using JavaScript. You are just using inline JavaScript.

Couple of issues:

  1. How do I enter decimal numbers (2.5 x 2 = 5)?

  2. How do you prevent user errors such as entering consecutive division operators (++++ or ----- or x±)?

You really should separate your JavaScript from the HTML. It will make it easier to add more functionality.


To be technical, it says use whatever libraries and APIs you need. If that means you get by without javascript, then…

It is not possible to complete this project without using JavaScript. You definitely do not have to use an external library or API as the project instructions state.

The OP is using vanilla JavaScript, which is perfectly fine, but without some extra JavaScript, the calculator will not be very user friendly.

1 Like

Hi @RandellDawson. Thanks so much for your insight-I always thought that the <script> tags were required in the html file when using inline JS; since I didn’t use any I thought I was just using html. Thank you for pointing out the issues with my app as well. It always helps to have a fresh pair of eyes to review your code! :grin: