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