menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Difference...
source image

Dev

2w

read

220

img
dot

Image Credit: Dev

Difference between ( )=>{ } and ( )=>( ) aero function in JavaScript (JS)

  • The difference between ()=>{} and ()=>() lies in how they handle function bodies and return statements in JavaScript.
  • When you use curly braces {} after the arrow (=>), it defines a function body.
  • If you want to return a value, you must use the return keyword explicitly.
  • When you use parentheses () after the arrow (=>), it defines an implicit return.

Read Full Article

like

13 Likes

For uninterrupted reading, download the app