Last active
August 29, 2015 14:25
-
-
Save ewilazarus/3b66c27842cff60ae645 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 makeMarkup(tag) { | |
return function(content) { | |
return "<" + tag + ">" + content + "</" + tag + ">"; | |
}; | |
} | |
var makeP = makeMarkup("p"); | |
var makeH1 = makeMarkup("h1"); | |
console.log(makeH1("This is my header")); // <h1>This is my header</h1> | |
console.log(makeP("This is my paragraph")); // <p>This is my paragraph</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment