Popular posts

JavaScript
React
Post image

5 JavaScript Scope Gotchas

5 situations when the JavaScript scope behaves differently than you expect.
Continue reading ➞
Post image

A Simple Explanation of Scope in JavaScript

The scope is an important concent that manages variables accessibility. I will explain step by step, in-depth, what the scope is in JavaScript.
Continue reading ➞
Post image

How && and || Operators Really Work in JavaScript

Posted April 9, 2020
In-depth post on how && (logical and) and || (logical or) operators work in JavaScript.
Continue reading ➞
Post image

The Module Import in JavaScript Has a Drawback

In JavaScript you might have difficulties to use autocomplete on named imports. Let's study the problem and find a solution.
Continue reading ➞
Post image

Why for...of Loop in JavaScript is a Gem

Posted March 25, 2020
for...of cycle in JavaScript iterates arrays, maps, sets, array-like objects, iterables, plus supports in-place destructuring.
Continue reading ➞
Post image

Handy Tips on Using console.log()

Practical tips on how to use efficiently console.log().
Continue reading ➞
Post image

What Happens When a Module Is Imported Twice?

A JavaScript module is evaluated just once. When imported multiple times from the same path, the same module instance is returned.
Continue reading ➞
Post image

3 Rules of React State Management

3 Rules of React State Management: one concept per state variable, extract complex state into hooks and extract multiple ops to reducers.
Continue reading ➞
Post image

4 Best Practices to Write Quality JavaScript Modules

JavaScript modules best practices: prefer named exports, no work during import, favor high cohesion and avoid long relative paths.
Continue reading ➞
Post image

4 Ways to Swap Variables in JavaScript

There are 4 good ways to swap variables in JavaScript: using a destructuring assignment, a temporary variable, addition & difference, or XOR operator.
Continue reading ➞