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.
JavaScript, Function
Boolean traps can cause readabiltiy and maintainability issues in your code. Learn what they are, how to spot and fix them in this article.
JavaScript, Function
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, Type
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
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 ES2020 introduced optional chaining and nullish coalescing among other features. Learn everything you need to know with this quick guide.
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, Object
Performs a deep comparison between two values to determine if they are equivalent.
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
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
JavaScript developers often get confused by JavaScript's variables and scope. Here's a quick guide to understanding and remembering everything related to these concepts.
JavaScript, Node
Checks if the given argument is a duplex (readable and writable) stream.
JavaScript, Node
Checks if the given argument is a writable stream.
JavaScript, Type
Checks if an object looks like a Promise
.
JavaScript, Node
Checks if the given argument is a readable stream.
JavaScript has three different empty states for variables. Learn their differences and how you can check for each one.