What Is The Difference Between Assigning An Iife's Public Members To A Variable Vs Returning An Object
I've been looking at a lot of JavaScript code lately and I've seen two different ways of using assigning 'public' properties of IIFE's. The first is to create a variable and assign
Solution 1:
There is no difference.
But I'd argue that the second one is a bit easier to maintain. When you change the variable name in the first example, you have to change it in the function as well.
Post a Comment for "What Is The Difference Between Assigning An Iife's Public Members To A Variable Vs Returning An Object"