js arrow function with parameters code example
Example 1: arrow function javascript
// Normal Function in JavaScript
function Welcome(){
console.log("Normal function");
}
// Arrow Function
const Welcome = () => {
console.log("Normal function");
}
Example 2: arrow func in javascript
const greet = (who) => {
return `Hello, ${who}!`;
};
greet('Eric Cartman'); // => 'Hello, Eric Cartman!'