JavaScript Memory Heap Checker - Online performance.memory
Display used/total/limit JS heap size using performance.memory. Take snapshots and see growth. Simple memory leak detection.
UD5 Toolkit
typeof & instanceof SandboxTest any JavaScript expression and instantly see its typeof result and instanceof inheritance chain. Understand the quirks of JavaScript types in a live sandbox.
| Constructor | Result |
|---|
Only built‑in constructors available in your browser are shown.
typeof is a unary operator that returns a string indicating the primitive type of its operand. It can distinguish between 'undefined', 'boolean', 'number', 'string', 'symbol', 'function', and 'object'. However, it has known limitations (e.g., typeof null returns 'object', and it cannot differentiate an array from a plain object).
null was 000, which coincided with the tag for objects. The behavior was kept for backward compatibility. To reliably check for null, use value === null.
typeof [] returns "object". To properly detect arrays, use Array.isArray(value) or value instanceof Array, both of which are much more reliable.
typeof [] === 'object' but [] instanceof Array is true.
instanceof requires an object on the left side. Primitives like numbers, strings, or booleans will always return false (e.g., 42 instanceof Number is false). However, primitives are temporarily wrapped in objects when you access methods, but instanceof sees the primitive.
Array.isArray(value). Alternatively, you can use value instanceof Array, but it may fail across different execution contexts (e.g., iframes). Our sandbox shows both methods.
NaN (Not‑a‑Number) is technically a numeric value according to the IEEE 754 floating‑point standard. JavaScript follows this specification. To check if a value is NaN, use Number.isNaN(value) or isNaN(value), though the latter coerces the argument.
typeof x === 'undefined'. This is the only safe way to check if a variable is declared but not defined, because accessing an undeclared variable throws a ReferenceError, while typeof never throws.
false. null and undefined are not objects, so they cannot be on the left side of instanceof (technically, the instanceof operator first coerces the left operand to an object, but the internal check fails for these values and returns false).
typeof cannot distinguish between different object subtypes such as Array, Date, RegExp, Map, or custom classes; all return "object". For those, you need instanceof or other specialized methods like Array.isArray().
Display used/total/limit JS heap size using performance.memory. Take snapshots and see growth. Simple memory leak detection.
Apply a Proxy to an object and see the get/set traps log fired in real time. Understand metaprogramming. Local.
Write JavaScript using element.animate() and see the result in a live preview. Compare with CSS keyframes. Debugger included.
Type any character and see how it renders in different font stacks. Detect missing glyphs and fallback behavior.
Create promises that resolve or reject after a delay. See state changes and chain .then/.catch. Debug async code.
Open a modal and see how focus is trapped and restored. Copy the lightweight focus‑trap code. Accessible pattern.
Write or paste HTML, CSS, and JavaScript and instantly see the rendered output in a sandboxed iframe. A handy frontend prototyping tool.
Check if your site has a visible and functional skip navigation link. Key for keyboard‑only users.
Choose a base style guide (Airbnb, Standard, Google) and add plugins. Generate a ready‑to‑use .eslintrc config.
Paste GeoJSON and instantly see it drawn on a draggable map. Supports points, lines, and polygons. Local fetch of tiles.
Calculate large Fibonacci numbers in a Web Worker. See the UI remain responsive. Copy the pattern for your app.
Split text into a JavaScript or JSON string array. Wrap in quotes, add commas. Ready to paste into code.
Run a CPU‑heavy calculation (e.g., prime numbers) in a Web Worker and see the UI stay responsive. Code snippet provided.
Find your car's engine oil capacity and recommended filter part number. Quick reference for DIY oil change.
Pick a random icebreaker question or activity for remote meetings. Never start a meeting awkwardly again.
Choose sawing material and thickness to get the correct blade type, TPI, and shank. Prevents burning and rough cuts.
Adjust root, margin, and threshold. See a live log of intersection events as you scroll. Debug lazy loading.
Compress text with Brotli at different quality levels. See size reduction and time. Find the sweet spot for your static assets.
Create a custom element with named slots and see content projection in action. Learn Web Components basics.
Enter income, pay frequency, and expected deductions to estimate your tax refund or balance due. Simplified model.
Generate a complete <head> section with meta charset, viewport, SEO, favicon, and social tags. Customize and copy.
Write a paint worklet in JavaScript and see it used as a CSS background instantly. Experiment with Houdini. Local.
List cached responses for your domain. View headers, content, and delete individual entries. Understand your PWA's cache.
Type raw HTML and see the escaped version, then see how it renders when unescaped. Understand encoding better.
Apply content‑visibility: auto to off‑screen sections and see the rendering cost drop. Demos for infinite scroll optimization.
Calculate how much thinner to add to achieve the right viscosity for spray guns. Common ratios.
Write a generator function and step through it with next(). See values and done state. Understand iterators.
See exact dimensions of your current browser inner/outer window, screen resolution, and pixel ratio. Developer debug.
Answer simple questions (braid/mono, hook/swivel) to see the recommended fishing knot with step‑by‑step animation.
Paste HTML/CSS and render it to a canvas image. Download as PNG. For creating dynamic social share images.