0

What is mean of " => " in JavaScript.

Please anyone tell me what is mean of " => " in JavaScript.

27th Sep 2019, 4:51 PM
CODE LINEšŸ”‹
CODE LINEšŸ”‹ - avatar
3 Answers
+ 6
Arrow function expressions ā€¢ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions **Arrow functions are a different way of creating functions in JavaScript. Besides a shorter syntax, they offer advantages when it comes to keeping the scope of the 'this' keyword. For example: function callMe(name) { console.log(name); } which you could also write as: const callMe = function(name) { console.log(name); } becomes: const callMe = (name) => { console.log(name); } ā€¢ https://code.sololearn.com/WKFF4vOCr3mi/?ref=app ā€¢ https://www.sololearn.com/post/48576/?ref=app Check this.Out: const shoutName = name => name.toUpperCase(); console.log( shoutName('iron manšŸ’»'));// IRON MANšŸ’»
5th Oct 2019, 9:08 AM
Danijel Ivanović
Danijel Ivanović - avatar
+ 4
It is used for arrow functions. For further reading, check this out: https://code.sololearn.com/WjYesJgQ383T/?ref=app
27th Sep 2019, 5:01 PM
Airree
Airree - avatar