Front End Development Libraries Projects - Build a JavaScript Calculator

Tell us what’s happening:

I pass all the tests except 13 " If 2 or more operators are entered consecutively, the operation performed should be the last operator entered (excluding the negative (-) sign." for example "The sequence “5 * - + 5” = should produce an output of “10"”. The input is impossible in my case since I made it idiot proof, meaning after a number you can only use one operator except for one “-” to signal the negative number. Because of this the input 5*-+5 will behave as such: 5* (here I lock every operator except for “-”) - (now I lock “-” as well and will only unlock the operators if a number, AC or equals is pressed). I really don’t know what to do, my program works as expected and the user can’t produce an error even if they wanted to.

Your code so far

https://codepen.io/Barka710/pen/EaaxrvN?editors=0011

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0

Challenge Information:

Front End Development Libraries Projects - Build a JavaScript Calculator

Hi @Barka710

You need to let the user input whatever they want. Your code logic then needs to work out what to do with that input.

Happy coding

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