<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/20-javascript-shorthand-techniques-that-will-save-your-time-7qlxcrdok" -->

---
title: 20 JavaScript Shorthand Techniques that will save your time
description: 20 JavaScript Shorthand Techniques that will save your time. The shorthand techniques of any programming language help you to write more clean and optimized...
canonical: https://daily.dev/posts/20-javascript-shorthand-techniques-that-will-save-your-time-7qlxcrdok
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 20 JavaScript Shorthand Techniques that will save your time | daily.dev
og:description: 20 JavaScript Shorthand Techniques that will save your time. The shorthand techniques of any programming language help you to write more clean and optimized...
og:url: https://daily.dev/posts/20-javascript-shorthand-techniques-that-will-save-your-time-7qlxcrdok
og:image: https://api.daily.dev/og/posts/7qLXCRdoK.png
og:image:alt: 20 JavaScript Shorthand Techniques that will save your time
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 20 JavaScript Shorthand Techniques that will save your time

**[Medium](https://daily.dev/sources/medium_js)** · 4 min read · 119 upvotes · 11 comments

## Summary

20 JavaScript Shorthand Techniques that will save your time. The shorthand techniques of any programming language help you to write more clean and optimized code and lets you achieve your goal with less coding. Let’s discuss some of the shorthand Techniques of JavaScript one by one.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/javascript-in-plain-english/20-javascript-shorthand-techniques-that-will-save-your-time-f1671aab405f>

## Community discussion

Top comments from developers on daily.dev.

**@savio** · 4 upvotes

> Superb! Great work bro, Really helped a lot. 🚀🚀🔥

**@ghost** · 4 upvotes

> This is what I like about JS. It's flexible enough for me to assign objects easily and that ternary operator (shorthand for if-else) works like a magic specially in toggle-like conditions.

**@blurk** · 3 upvotes

> Cool tips, especially the Deep Cloning 👏

**@lorenalgm** · 2 upvotes

> Great tips! Thanks o/

**@zaolover** · 2 upvotes

> Awesome!

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/20-javascript-shorthand-techniques-that-will-save-your-time-7qlxcrdok)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"20 JavaScript Shorthand Techniques that will save your time","url":"https://daily.dev/posts/20-javascript-shorthand-techniques-that-will-save-your-time-7qlxcrdok","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/20-javascript-shorthand-techniques-that-will-save-your-time-7qlxcrdok"},"datePublished":"2020-11-01T22:37:26.443Z","dateModified":"2021-10-07T14:17:10.317Z","description":"20 JavaScript Shorthand Techniques that will save your time. The shorthand techniques of any programming language help you to write more clean and optimized...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/718e30238f806781b256285e338aadc2","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/718e30238f806781b256285e338aadc2","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":11,"discussionUrl":"https://daily.dev/posts/20-javascript-shorthand-techniques-that-will-save-your-time-7qlxcrdok","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":119},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":11}],"keywords":"javascript","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"20 JavaScript Shorthand Techniques that will save your time"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/20-javascript-shorthand-techniques-that-will-save-your-time-7qlxcrdok","comment":[{"@type":"Comment","text":"Superb! Great work bro, Really helped a lot. 🚀🚀🔥","datePublished":"2020-11-02T12:16:58.415Z","url":"https://daily.dev/posts/7qLXCRdoK#c-c7Q9RYmof","author":{"@type":"Person","name":"Savio Martin","url":"https://daily.dev/savio","image":"https://avatars0.githubusercontent.com/u/61895712?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"This is what I like about JS. It’s flexible enough for me to assign objects easily and that ternary operator (shorthand for if-else) works like a magic specially in toggle-like conditions.","datePublished":"2020-11-02T07:01:15.494Z","url":"https://daily.dev/posts/7qLXCRdoK#c-wdkS7iZQf","author":{"@type":"Person","name":"Deleted user","url":"https://daily.dev/ghost","image":"https://media.daily.dev/image/upload/s--hNIUzLiO--/f_auto/v1705327420/public/ghost_vlftth"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"Cool tips, especially the Deep Cloning 👏","datePublished":"2020-11-02T04:30:38.342Z","url":"https://daily.dev/posts/7qLXCRdoK#c-hfRLaeKmx","author":{"@type":"Person","name":"Sinh Nguyen","url":"https://daily.dev/blurk","image":"https://media.daily.dev/image/upload/v1684678076/avatars/avatar_IbcaoHvq6.jpg"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Great tips! Thanks o/","datePublished":"2020-11-02T03:28:23.805Z","url":"https://daily.dev/posts/7qLXCRdoK#c-5b2lHwlOa","author":{"@type":"Person","name":"Lorena GM","url":"https://daily.dev/lorenalgm","image":"https://avatars0.githubusercontent.com/u/19291466?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Awesome!","datePublished":"2020-11-02T00:48:22.659Z","url":"https://daily.dev/posts/7qLXCRdoK#c-kiQ-Q47vc","author":{"@type":"Person","name":"ZaO Lover","url":"https://daily.dev/zaolover","image":"https://lh3.googleusercontent.com/a-/AOh14Ggdho-M3BrbA_A02Au48N-9nwOJez3D34iODSS_=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}}]}
```

