2 ms·
given the article neglects to provide an example, I have one handy from my git: https://gist.github.com/ajeffrey/092b71a3ad5f2034601574262c5c1167#file-cgol-js-
by beaconstudios 9y ago
given the article neglects to provide an example, I have one handy from my git:
https://gist.github.com/ajeffrey/092b71a3ad5f2034601574262c5c1167#file-cgol-js-L26 https://gist.github.com/ajeffrey/092b71a3ad5f2034601574262c5...
Note how on this line, arguments are not present and passed around - the input of the function being declared is simply passed from function to function, with the output of each becoming the input of the next. When you can write code this way, it improves clarity by putting the focus on what the code is _doing_ rather than whatever arbitrary name you're giving the input parameters. It's definitely a tool for use in specific situations though as often the name of the arguments helps a great deal with readability.