DEV Community

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

Posted on

2

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

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay