Skip to content

Instantly share code, notes, and snippets.

@xiaoyunyang
Last active January 25, 2018 09:06
Show Gist options
  • Save xiaoyunyang/f4424d4abf97878e31d8b15f499d120b to your computer and use it in GitHub Desktop.
Save xiaoyunyang/f4424d4abf97878e31d8b15f499d120b to your computer and use it in GitHub Desktop.
Closure With Recursion
num = 0
var myFun = function() { 
incrementUntil(3)
  return num 
}
myFun() //> 3
num //> 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment