JavaScript is a very forgiving language. It’s easy to write code that runs but has mistakes in it.
In this article, we’ll look at using the object literal shorthand syntax, arrow functions for callbacks, and using const most of the time to prevent accidental reassignment.
Use Object Literal Shorthand Syntax
We should use object literal shorthand syntax for populating our object with properties.
There’re 2 kinds of shorthands that are available for populating object properties in objects.
One is the object property shorthand and the other is the method shorthand.

#javascript #web-development #programming

JavaScript Best Practices — Object Shorthand and Arrow Functions
1.40 GEEK