When we use ()=>{}
we cannot get arguments in it, but we can use arguments in function(){}
. Why? I thought () => {}
is just an another way of function() {}
. Now it means I was wrong.
Asked
Active
Viewed 37 times
0

CodeAlien
- 766
- 2
- 7
- 15
-
Really good question ! But sadly this is somewhat a duplicate of https://stackoverflow.com/questions/24900875/whats-the-meaning-of-an-arrow-formed-from-equals-greater-than-in-javas – realappie Aug 24 '18 at 12:40
-
Read the first para here - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions – Nikhil Aggarwal Aug 24 '18 at 12:41