arrow function how to write code example
Example 1: () = javascript
//Normal function
function sum(a, b) {
return a + b;
}
//Arraw function
let sum = (a, b) => a + b;
Example 2: js arrow function
hello = () => {
return "Hi All";
}
//Normal function
function sum(a, b) {
return a + b;
}
//Arraw function
let sum = (a, b) => a + b;
hello = () => {
return "Hi All";
}