Vote count:
0
How could I make this possible within Javascript? I have no idea where to start.
I want to be able to get a string such as var sum = "1+1-2.1*3/5";
and allow spaces too (we can strip spaces) — and then calculate it.
I've only ever done sums like this: var answer = 5+5;
.
Any help would be appreciated. Thanks.
asked 34 secs ago
Javascript — String Sums to Literal
Aucun commentaire:
Enregistrer un commentaire