5 JavaScript Scope GotchasPosted April 26, 2020javascriptscopevariableStart discussion5 situations when the JavaScript scope behaves differently than you expect. Continue reading ➞
A Simple Explanation of Scope in JavaScriptPosted April 20, 2020javascriptscopevariableStart discussionThe 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 ➞
How && and || Operators Really Work in JavaScriptPosted April 9, 2020javascriptStart discussionIn-depth post on how && (logical and) and || (logical or) operators work in JavaScript. Continue reading ➞
The Module Import in JavaScript Has a DrawbackPosted April 1, 2020javascriptes2015moduleStart discussionIn JavaScript you might have difficulties to use autocomplete on named imports. Let's study the problem and find a solution. Continue reading ➞
Why for...of Loop in JavaScript is a GemPosted March 25, 2020javascriptforStart discussionfor...of cycle in JavaScript iterates arrays, maps, sets, array-like objects, iterables, plus supports in-place destructuring. Continue reading ➞
Handy Tips on Using console.log()Posted March 18, 2020javascriptdebuggingStart discussionPractical tips on how to use efficiently console.log(). Continue reading ➞
What Happens When a Module Is Imported Twice?Posted March 10, 2020javascriptes2015moduleStart discussionA JavaScript module is evaluated just once. When imported multiple times from the same path, the same module instance is returned. Continue reading ➞
3 Rules of React State ManagementPosted March 4, 2020javascriptreactstateStart discussion3 Rules of React State Management: one concept per state variable, extract complex state into hooks and extract multiple ops to reducers. Continue reading ➞
4 Best Practices to Write Quality JavaScript ModulesPosted February 26, 2020javascriptmoduleclean codeStart discussionJavaScript modules best practices: prefer named exports, no work during import, favor high cohesion and avoid long relative paths. Continue reading ➞
4 Ways to Swap Variables in JavaScriptUpdated March 23, 2023javascriptvariableStart discussionThere are 4 good ways to swap variables in JavaScript: using a destructuring assignment, a temporary variable, addition & difference, or XOR operator. Continue reading ➞