Popular posts

JavaScript
React
Post image

How to Parse URL in JavaScript: hostname, pathname, query, hash

Updated January 29, 2023
How to easily parse URL in JavaScript and access components like hostname, pathname, query, or hash.
Continue reading ➞
Post image

3 Ways to Detect an Array in JavaScript

3 ways to check if a value is an array in JavaScript: Array.isArray(), instanceof Array and toString() === '[object Array]'.
Continue reading ➞
Post image

How to Get the Screen, Window, and Web Page Sizes in JavaScript

Posted June 23, 2020
How to get the screen, browser window, and web page sizes (width and height) in JavaScript.
Continue reading ➞
Post image

3 Ways to Check If an Object Has a Property/Key in JavaScript

The 3 ways to check if an object has a property or key in JavaScript: hasOwnProperty() method, in operator, comparing with undefined.
Continue reading ➞
Post image

How to Compare Objects in JavaScript

How to compare objects in JavaScript: referential, manual, shallow, and deep equality.
Continue reading ➞
Post image

Object.is() vs Strict Equality Operator in JavaScript

When should you use Object.is() instead of strict equality check in JavaScript?
Continue reading ➞
Post image

Own and Inherited Properties in JavaScript

Knowing the difference between own and inherited properties helps understanding the JavaScript prototypal inheritance.
Continue reading ➞
Post image

5 Differences Between Arrow and Regular Functions

The 5 must-know differences between arrow and regular functions in JavaScript.
Continue reading ➞
Post image

How to Use Object Destructuring in JavaScript

Object destructuring is a JavaScript feature to extract properties from objects and bind them to variables.
Continue reading ➞
Post image

Your Guide to React.useCallback()

Updated January 28, 2023
React.useCallback() memoizes callback functions.
Continue reading ➞