Arrow Functions

Explanation:

Arrow functions are a new way to write anonymous function expressions, and are similar to lambda functions in some other programming languages, such as Python. Arrow functions differ from traditional functions in a number of ways, including the way their scope is determined and how their syntax is expressed.


Code:

Before

let welcome = function(name){
   return `Welcome ${name}`;
}

console.log(welcome("Yahoo Baba"));

With Arrow Function

let welcome = (name) => {
   return `Welcome ${name}`;
}

console.log(welcome("Yahoo Baba"));

Arrow Function with Multiple Parameters

let welcome = (name,age) => {
 return `Welcome ${name} ${age}`;
}
	
console.log(welcome("Yahoo Baba", 30));

Comments :

qasim Date: 8/4/2025

Description goes here