Answers for "es6 method definition syntax"

1

es6 method definition syntax

const obj = {
  foo() {
    return 'bar';
  }
};

console.log(obj.foo());
// expected output: "bar"
Posted by: Guest on September-06-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language