js object method arrow function code example
Example: javascript return object in arrow function
const func = () => ({ foo: "bar" });
console.log(func()); // { foo: "bar" }
const func = () => ({ foo: "bar" });
console.log(func()); // { foo: "bar" }