The JavaScript snippet collection contains a wide variety of ES6 helper functions. It includes helpers for dealing with primitives, arrays and objects, as well as algorithms, DOM manipulation functions and Node.js utilities.
Boolean traps can cause readability and maintainability issues in your code. Learn what they are, how to spot and fix them in this article.
JavaScript, Function · Jul 11, 2021
JavaScript doesn't have a built-in way to check if a value is blank, but it's easy to create one.
JavaScript, Type · Sep 25, 2022
JavaScript's built-in Boolean function can be very useful for truth-checking data among other things. Learn how to use it and level up your code today.
JavaScript, Function · Jun 12, 2021
JavaScript uses type coercion in Boolean contexts, resulting in truthy or falsy values. Get a hang of how it all works in this quick guide.
JavaScript, Type · Sep 12, 2021
One of the most commonly asked JavaScript interview questions is about hoisting. It's also a concept that might require some getting used to, so read our guide to learn more.
JavaScript, Type · Jun 12, 2021
Performs a deep comparison between two values to determine if they are equivalent.
JavaScript, Object · Oct 13, 2021
JavaScript ES2020 introduced optional chaining and nullish coalescing among other features. Learn everything you need to know with this quick guide.
JavaScript, Type · Jun 12, 2021
JavaScript's instanceof
operator can't be used with primitive values, but there are a couple of simple tricks that you can leverage to your advantage.
JavaScript, Type · Jun 12, 2021
Checks if the a value is an empty object/collection, has no enumerable properties or is any type that is not considered a collection.
JavaScript, Type · Oct 20, 2020
Make sure to use the correct method when checking if a JavaScript object is an array.
JavaScript, Type · Nov 6, 2022
JavaScript variables can be declared a handful of ways. However, they're not all created equal and understanding their differences can drastically change the way you code.
JavaScript, Type · Dec 2, 2021
Checks if the given argument is a duplex (readable and writable) stream.
JavaScript, Node · Oct 20, 2020
Have you ever tried to convert the string representation of a boolean to an actual boolean value? Here's a simple way to do it.
JavaScript, String · Sep 14, 2022