When ever I am trying to write a simple arrow function in ES6, I get the output right but also get an undefined in the result.
const greet = (name) => {
return `Hello ${name}`;
};
console.log(greet("Nagendra"));
When ever I am trying to write a simple arrow function in ES6, I get the output right but also get an undefined in the result.
const greet = (name) => {
return `Hello ${name}`;
};
console.log(greet("Nagendra"));