Skip to content

Instantly share code, notes, and snippets.

@Chadtech
Created March 26, 2015 19:14
Show Gist options
  • Save Chadtech/13b9567377478c8de091 to your computer and use it in GitHub Desktop.
Save Chadtech/13b9567377478c8de091 to your computer and use it in GitHub Desktop.
sayHi = function(){
console.log('Hi');
}
sayHello = () => {
console.log('Hello');
}
sayHey = function(someone){
console.log('Hey ' + someone);
}
sayHey('guys');
// => 'Hey guys'
saySomething = function(guy, comment){
comment(guy);
}
saySomething('Henry', function(toWho){
console.log('Hey ' + toWho + ', hows it going?')
});
setCool = function(object){
object.cool = true;
return object
}
raquetBall = {
isASport: true,
ball: 'Raquet Ball'
}
raquetBall = setCool(raquetBall);
console.log(raquetBall.cool);
// => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment