Relative Content

Tag Archive for javascriptreactjsstate

State is reverting back even after i confirmed its change

so when i click evalute this expression ‘3+5*6-2/4’ then result state is set to 32.5
after that clear function is being triggered and it sets the state to ” and after that when i press 5 it reverts the previous state which is ‘32.5’ and add ‘5’ into it making it ‘32.55’ this behaviour is not observed first few test
i am using fcc test bundle to test the code but before i can complete it ran into this problem
and below given are logs of the print statements