DEV Community

Discussion on: JavaScript: Write cleaner code with Functional Programming

Collapse
 
r0r71z profile image
Raddelyn Ortiz

Hey, what you've done here is really cool. I definitely think this pattern is valuable, especially when your intention is to have "similar" functions in your projects. Thanks!

BTW: Most modern browsers support the newest JavaScript versions, so you should be able to run ES6+ syntaxes on the console.

Collapse
 
vonheikemen profile image
Heiker

The problem is not the browser, is me. I made a lot of mistakes while making that snippet, so I had to run it multiple times. If I use const I would have to keep changing the variable names after each attempt, 'cause const doesn't let me redeclare variables.