7 Small Hidden Features of JavaScript Decreasing Your Development Time

Easy and applicable without having to be a master developer

Arnold Abraham
Nerd For Tech

--

Adapted Original Footage from Snow White and the Seven Dwarfs (Original content rights from 1937 reserved to Walt Disney Company/Disney Enterprises, Inc.)

JavaScript can be a rough jungle and although languages were invented to make our life easier as a developer. JavaScript sometimes doesn’t. Guess what?! There were many changes during the last versions of ECMAScript to make our coding life actually worthwhile.

It may sound like the fairytale of Snow White and the Seven Dwarfs!

But don’t worry, this won’t be a fairytale post, will it? At least, I will show you magic tricks that will shorten down your development time, increase readability, and also reveal features you might haven’t discovered yet.

I also struggled in my early years of development with many parts of JavaScript.

Let’s fill your developer life with convenience!

1. Nullish-Coalescing

Since the dynamic type system is older than the internet itself, there is a tradition to check if a variable, a parameter, or a property of an object is defined at all.

After checking that, you set it normally to a default value. Mostly an if-check wins this race.

--

--

Arnold Abraham
Nerd For Tech

JavaScript, TypeScript and C#/.NET Tutorials/News/Best Practices by a German Software Engineer - Fun helps you to learn on the fly --> arnoldcode.com