es6 method definition syntax

Solutions on MaxInterview for es6 method definition syntax by the best coders in the world

showing results for - "es6 method definition syntax"
Sofia
20 Jan 2019
1const obj = {
2  foo() {
3    return 'bar';
4  }
5};
6
7console.log(obj.foo());
8// expected output: "bar"