Push parameter into IIFE/IIAF

Push a parameter of an immediately-invoked function expressions (IIFEs) or an immediately-invoked arrow functions (IIAFs) into the function body.

Push parameter into IIFE/IIAF

Why is this refactoring helpful?

With the introduction of let and const in ES6, passing parameters into IIFEs as become unnecessary in many cases. Pushing the parameters into the IIFE can simplify the code and unlock the removal of the IIFE.


Related Code Assists

Learn More

Available In