18 lines
304 B
JavaScript
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);
|