A complete guide to JavaScript typechecking
Learn all you need to know to effectively and efficiently typecheck values in JavaScript.
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.
Learn all you need to know to effectively and efficiently typecheck values in JavaScript.
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'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 doesn't have a built-in way to check if a value is blank, but it's easy to create one.
Learn how to type check objects at runtime using the powerful Proxy object in JavaScript.
Quickly determine if a collection of values is empty in JavaScript.
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 uses type coercion in Boolean contexts, resulting in truthy or falsy values. Get a hang of how it all works in this quick guide.
Learn how to type check for different types of streams in Node.js.
JavaScript ES2020 introduced optional chaining and nullish coalescing. Learn everything you need to know with this quick guide.
Make sure to use the correct method when checking if a JavaScript object is an array.
JavaScript's instanceof
operator can't be used with primitive values, but there are a some tricks that you can leverage to your advantage.
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.
Use a simple JavaScript trick to validate a serialized JSON object.
JavaScript variables can be declared a handful of ways. However, understanding their differences can drastically change the way you code.
JavaScript developers often get confused by JavaScript's variables and scope. Here's a quick guide to understanding these concepts.
JavaScript has three different empty states for variables. Learn their differences and how you can check for each one.
Learn all you need to know about the differences between JavaScript's double equals and triple equals operators.
You've probably come across the double negation operator (!!
) before, but do you know what it does?
Did you know there's a JavaScript value that's not equal to itself?
When it comes to immutability, JavaScript strings are often a source of confusion. Yet they're not as complicated as you might expect.
Numeric separators are a somewhat lesser-known JavaScript syntactic sugar that can make working with large constants a lot easier.
JavaScript distinguishes expressions and statements. Learn their differences in this short article.
Object.is()
and the triple equals operator (===
) can both be used for equality checking in JavaScript, but when should you use each one?