udemy-node-notes/playground/arrow-function.js
2017-12-01 00:32:51 -05:00

18 lines
304 B
JavaScript

var square = x => x * x;
console.log(square(9));
var user = {
name: "Tyrel",
sayHi: () => {
console.log(arguments);
console.log(`Hi I'm ${this.name}.`);
},
sayHiAlt () {
console.log(arguments);
console.log(`Hi I'm ${this.name}.`);
}
}
user.sayHi(1,2,3);
user.sayHiAlt(1,2,3);