DEV Community

Cover image for Tricks to write less JavaScript Code
Shamaz saeed
Shamaz saeed

Posted on

Tricks to write less JavaScript Code

If you’re new to javascript or always looking to improve your skills, consider writing short-hand javascript when appropriate.
Here I will give you some javascript tricks to write less and optimized code

Declaring Variables

Image description

Assignment Operator

Image description

Ternary Operator

Image description

Arrow Function

Image description

Object with same Keys and Values

Image description

If you have others tricks do share. I would love to add them into this post.

Like this post and follow me

Thanks

Top comments (0)