DEV Community

Discussion on: 17 Javascript optimization tips to know in 2021 πŸš€

Collapse
 
aboudard profile image
Alain Boudard

Great list of tips !
About arrow function, if I'm not wrong, you can lose the paranthesis (these should be brackets no ?) here :

//shorthand
getArea = diameter => Math.PI * diameter;

Collapse
 
blessinghirwa profile image
Blessing Hirwa

That's also correct. I just wanted everyone to spot the difference between the tow functions.