May I suggest also creating more "generic" helper functions. Not sure how readable this is but I'd like to show how far you can get using general purpose functions.
Forgive my use of var, I was testing this in the console.
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.
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
May I suggest also creating more "generic" helper functions. Not sure how readable this is but I'd like to show how far you can get using general purpose functions.
Forgive my use of
var
, I was testing this in the console.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.
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, 'causeconst
doesn't let me redeclare variables.