99% of JavaScript Developers don’t know these tricks!



JavaScript is a weird language, but if we dig deeper, you’ll discover that things don't simply happen out-of-the-box. There is always some rational explanation for it.

Here we will look at some of the JavaScript tricks that really come in handy at some point in time. So let's get started!

Proxy in JavaScript is an object that wraps another object and intercepts fundamental operations like property access, assignment, or function invocation.

Symbols are typically used as unique keys for object properties. They are guaranteed to be unique, which means no two symbols will ever be the same, even if they have the same description (a string that can be provided when creating a symbol).

The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.

The nullish coalescing operator can be used in a variety of situations to avoid errors when a variable might be null or undefined. It is an extremely useful trick that is often overlooked. But please don’t use it unless and until you know what you are doing in life, sorry I mean in JavaScript🤓