JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Follow publication

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Written by Amitav Mishra

A front-end web developer who loves to write blogs on JavaScript, Angular, HTML, CSS, etc. Find them all on jscurious.com

Responses (35)

Write a response

The primary goal for writing code should be understandability and clarity. These shorthands may save you a few milliseconds of typing time... but if the code you write is confusing, you will spend way more time debugging issues. This is especially…

--

let isEven = (number % 2 === 0) ? true : false;

let isEven = (number % 2 === 0); is enough

--

I'm going to venture into dangerous territory (as a non-professional programmer) and make a bold statement - if you are using shorthand to save time you are doing it wrong.
Shorthand that makes code clearer by removing junk is good, shorthand that is…

--