Skip to content

Instantly share code, notes, and snippets.

@aoi0308
Created September 9, 2012 15:11
Show Gist options
  • Save aoi0308/3684934 to your computer and use it in GitHub Desktop.
Save aoi0308/3684934 to your computer and use it in GitHub Desktop.
クロージャのサンプル その2
var plus5 = addfac(5);
console.log(plus5(10));
function addfac(n) {
return function(m) {
return n + m;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment