+ 3
How's my JS/HTML Calculator?
It has a variety of buttons. When a button is clicked, a function is fired to add a number, a series of numbers or a character to a string. Once the equals button is clicked, a mathematical JS parser is fired to parse the said string and get an answer. (Debounce) It'll set the class of a certain tag to something when the = button is pressed or an error occurs. Then, when another digit is pressed, it'll check to see if the string has that class. If it does, it'll clear the string first.
5 Antworten
+ 4
@Chinny: I think "it's" is a contraction...unless you meant 'retard' as a friendly 'chinning' ;)
+ 4
Interesting behavior with double decimal points (8.8.9 + 0 helps show what's happening).
+ 2
I think its perfect
+ 2
;)
+ 2
Just noticed @Kirk. I'll look into it soon, thanks for letting me know.