Created
August 29, 2019 08:26
-
-
Save Lily-La-Day/7456efd69c5d0b2292cd5b887adba436 to your computer and use it in GitHub Desktop.
Pure Function Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//pure | |
const add = (x, y) => x + y | |
//impure | |
let x = 2 | |
const add = (y) => { x += y } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment