Skip to content

Instantly share code, notes, and snippets.

@razodactyl
Created June 7, 2016 07:26
Show Gist options
  • Save razodactyl/8cb5ff26437344a8252a2c406b79c263 to your computer and use it in GitHub Desktop.
Save razodactyl/8cb5ff26437344a8252a2c406b79c263 to your computer and use it in GitHub Desktop.
// the array of functions
const fns = [
function () {
console.log("ONE")
},
function () {
console.log("TWO")
},
function () {
console.log("THREE")
}
]
fns.forEach(Function.prototype.call, Function.prototype.call)
// Expected console output should be
// ONE
// TWO
// THREE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment