An arrow followed by a greater than key could be used as a shortcut of initializing a function in JavaScript. Wow I tried and it worked check the image above and try it for yourself.
//function
function playMusic (music){
console.log( "I love Playing "+ music);
}
playMusic("Jazz");
//function shortcut
const playMusic1 = music1 =>console.log( "I Love playing " +music1);
playMusic1("Jazz")
Top comments (0)