const obj = { foo() { return 'bar'; }, }; console.log(obj.foo()); // Expected output: "bar"
JavaScript Demo: Functions Definitions
Run ›
Reset