DEV Community

loading...

Discussion on: Writing Immutable and Functional JavaScript

Collapse
aroramayur profile image
aroramayur

const twoAddedPointFree = arr.map(addTwo) // [ 3, 4, 5]

Collapse
jacobmgevans profile image
Jacob Evans Author

🤣🤣🤣🤣 I math'd wrong 😅😅😅

Thank you! 😁

Collapse
aroramayur profile image
aroramayur

Welcome! You know it'd be great if you add some examples of the perils of mutating objects / data in an app, and how it can lead to debugging nightmare. Just a thought.