Categories
October Surprise 2016

Defining and calling function in one step – Stack Overflow

But is there a cleaner way of defining and calling a function in one go? Sort of like a hybrid of both examples? Not being able to do this isn’t preventing me from doing anything, but it feels like it would be a nice expressive way to write recursive functions or functions that need to be run on $ (document).ready () but also later when situations change, etc.