May 16, 2023
Simple Arrow Function Number
let ArrowFunction = (a, b) => 5 * 7;
console.log(ArrowFunction());
Output
35
Simple Arrow Function String
let ArrowFunction = () => "Hello World";
console.log(ArrowFunction());
Output
Hello World
Simple Arrow Function Length
let country = ["India", "Bangladesh", "Srilanka", "China"];
console.log(country.map((country) => country.length));
Output
[ 5, 10, 8, 5 ]
by : Nehal Akhtar
Quick Summary:
Different Type Arrow Function In JavaScript Programme