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