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 Boolean function can be used for truth-checking data among other things. Learn how to use it and level up your code today.
JavaScript, Function · Jun 12, 2021
Checks if the provided value is of the specified type.
JavaScript, Type · Oct 20, 2020
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
Learn how to type check objects at runtime using the powerful Proxy object in JavaScript.
JavaScript, Object · Apr 23, 2023
Performs a deep comparison between two values to determine if they are equivalent.
JavaScript, Object · Oct 13, 2021
Hoisting comes up a lot during JavaScript interviews. It's a concept that may require some getting used to, so read our guide to learn more.
JavaScript, Type · Jun 12, 2021
JavaScript ES2020 introduced optional chaining and nullish coalescing. Learn everything you need to know with this quick guide.
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
JavaScript's instanceof
operator can't be used with primitive values, but there are a some tricks that you can leverage to your advantage.
JavaScript, Type · Jun 12, 2021
Make sure to use the correct method when checking if a JavaScript object is an array.
JavaScript, Type · Nov 6, 2022
Checks if the provided argument is array-like (i.e. is iterable).
JavaScript, Type · Oct 20, 2020
Checks if the given argument is a duplex (readable and writable) stream.
JavaScript, Node · Oct 20, 2020