-5

I searched for

"()=>{} in js"

on Google But it's not displaying relative results What is it?

1 Answers1

1

=> is a shortcut for an anonymous function. So that's just a function that does nothing. equivalent to:

function () { }
Kevin DiTraglia
  • 25,746
  • 19
  • 92
  • 138
  • ...except [lexical context](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#Relation_with_strict_mode). – 31piy Feb 08 '18 at 03:50