Created
March 20, 2012 21:05
-
-
Save paulbruno/2141298 to your computer and use it in GitHub Desktop.
Pattern for recursive, "one-off" functions (especially useful for DOM traversal, when not using frameworks, or other similar throw-away recursive front-end tasks).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function _this (/* your param list here */) { | |
/// INIT CODE HERE /// | |
if (/* your condition here */) { | |
_this(/* your passed params here */); | |
} | |
})(/* initial passed params here */); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment