Last active
November 18, 2019 18:03
Boolean Intro a Javascript
This file contains 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 expresion | |
var sayHello = function(name){ | |
console.log("Hello " + name); | |
}; | |
// function as a value in a key => value pair | |
var simple_object = { | |
sayGodbye: function(name){ | |
console.log("Bye " + name); | |
} | |
}; | |
// function that returns a function | |
function doMagic(ingredient){ | |
return function excecute(ingredient){ | |
console.log(ingredient); | |
}; | |
} | |
var makeMagic = doMagic(); | |
makeMagic("hat"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment