Skip to content

Instantly share code, notes, and snippets.

@sbstn-jmnz
Last active November 18, 2019 18:03
Show Gist options
  • Save sbstn-jmnz/1c8a6f8dc2a35f537e05a83ddbe00e6d to your computer and use it in GitHub Desktop.
Save sbstn-jmnz/1c8a6f8dc2a35f537e05a83ddbe00e6d to your computer and use it in GitHub Desktop.
Boolean Intro a Javascript
// 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