Arrow Function in Javascript

 Arrow Function in Javascript

In this article we are goanna to see about Arrow Function in Javascript and where we use these. which is most important when you are going to start your career in JavaScript. Please ready and enjoy this article if you want to give any feedback about your experience, we welcome.



Arrow functions were introduced in ES6.

Arrow functions allow us to write shorter function and arrow functions are always anonymous.

Syantx:

( ) => { statements};


Ex:

//Normal function

function myfun( ){

document.write(“Hello world”);

};

//Arrow function

( ) => {document.write(“Hello world”);};


Share:

0 comments

Please leave your comments...... Thanks