There was a paragraph that I didn’t finish regarding why using
qs()() should be used instead of
jQuery(). Hopefully the editor will be a little more careful next time to let the writers know about these kinds of things such that guys like me don’t forget to finish a thought before its published.
Whoops! How I described the closures in the long version of my
qs()() function was incorrect. Every time you use an arrow function
=> that creates another scope layer. And if you do it at the beginning, you are setting up a nesting structure. I hope this new code will provide some better clarity.
I’m also going to use JSDoc from now on to describe my functions and arguments (parameters).