r/javascript • • Aug 27 '16

Is your JavaScript function actually pure?

http://staltz.com/is-your-javascript-function-actually-pure.html
8 Upvotes

48 comments sorted by

View all comments

0

u/[deleted] Aug 27 '16

[deleted]

1

u/bullet_darkness Aug 28 '16

Welp looks like every built in Math function is impure cause you can give it self-mutating/self-changing inputs. You can't ever trust Math.pow or Math.sin ever again since they won't necessarily give you a consistent output. /s