2 ms·
Looks good! I love the idea of the embedded calculator I noticed that it doesn't handle remainder/modulo (%) equations: "10 % 2" results in: "Left hand side o
by flanbiscuit 4y ago
Looks good! I love the idea of the embedded calculator
I noticed that it doesn't handle remainder/modulo (%) equations:
"10 % 2" results in: "Left hand side of addition cannot be a percentage."
It does look like decimal.js can handle that: https://mikemcl.github.io/decimal.js/#mod https://mikemcl.github.io/decimal.js/#mod
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Remainder https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- ianbicking 4y agoYou can do "6% of $10" and get "$0.6" (minor note that it would look better as $0.60). Looks like there's a mod operator, so "2303 mod 10" gives 3.
- mcintyre1994 4y agoIt does, but you have to type `10 mod 2`