+ 1
How to create a calculator using Javascript?
I want to create a calculator that when I press the operator(+- / %) the value of my input type text is saved to another variable as number while the value of input is erased. I know how to make string a number I just have a problem with the erased value. Please help thanks.
3 Réponses
+ 18
eval(stringCode) can be helpful......
+ 5
Look at user codes in playground: many have write ( or save sometimes ^^ ) some calculators implemented in JS...
Not, a complete one, but an example made to understand the principle:
https://code.sololearn.com/WzS1Rzioz166/#js
+ 1
Thanks :)