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

console.log(obj.foo());
// Expected output: "bar"