diff --git a/playground/arrow-function.js b/playground/arrow-function.js new file mode 100644 index 0000000..986022b --- /dev/null +++ b/playground/arrow-function.js @@ -0,0 +1,17 @@ +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);