tanzie1313 / dom-events-lab

0 stars 0 forks source link

misplaced logic #3

Open DigitalPhoneme opened 2 weeks ago

DigitalPhoneme commented 2 weeks ago

https://github.com/tanzie1313/dom-events-lab/blob/1de704413308b8099e5a997f9813af15190b2682/app.js#L37

currentOperatioris being set inside handlebuttonClick right after handleOperatorClick is called, which can cause confusion in the code's flow. Remove the linecurrentOperatior = clickedbuttonValue; from handlebuttonClick to keep this assignment within handleOperatorClick.