Skip to content

Instantly share code, notes, and snippets.

@samsmo
Created February 19, 2014 16:38
Show Gist options
  • Save samsmo/9095849 to your computer and use it in GitHub Desktop.
Save samsmo/9095849 to your computer and use it in GitHub Desktop.
A Pen by Sam .
<div class="container">
<div id="math"></div>
</div>
var makeAddf = function (x) {
return function(y) {
var r = x + y;
x++;
return r;
};
};
var add = makeAddf(4);
add(2);
document
.getElementById('math')
.innerHTML = add(3);
#math{
color: #F359B4;
font-size: 80px;
font-family: courier;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment