Syntaxe de définition de la méthode ES6
const obj = {
foo() {
return 'bar';
}
};
console.log(obj.foo());
// expected output: "bar"
Annoying Angelfish
const obj = {
foo() {
return 'bar';
}
};
console.log(obj.foo());
// expected output: "bar"