-> Its a shortest way to define functions.
EXAMPLE:
Without Parameter
var kamal =()=>{console.log("Its a arrow functions")}
kamal() ///call function
With Parameter
var kamal =(a)=>{console.log("value of a is :"+a)}
kamal(5) ///call function
With Multiple Parameter
var kamal =(a,b)=>{
var c=a+b
console.log("value of c is :"+c)}
kamal(5,5) ///call function
OUTPUT- value of c is :10
No comments:
Post a Comment