Favorites
JavaScript

JavaScript Resources

Everything you need to write better JavaScript: the built-in objects and their methods, the DOM for working with web pages, and every operator and statement, each with a live example you can run in the browser. Plus tools to check your code for errors, tidy or minify it, test regular expressions and inspect keyboard and mouse events.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Language Reference

4 references
JavaScript Global Objects

The built-in objects available in every JavaScript environment, such as Array, String, Promise, Map and Math.

JavaScript Methods & Properties

Every method and property of the built-in objects, from Array.prototype.map() to JSON.parse(), plus the global functions.

JavaScript Operators

Arithmetic, comparison, logical, assignment and other operators, with their precedence and how they behave.

JavaScript Statements

Statements and declarations such as if...else, for...of, let, const, class, try...catch and import.

Browser & DOM

3 references
DOM Reference

Find, create and change elements, handle events and work with forms, storage and timers using the Document Object Model.

HTML Event Attributes

The on* attributes, such as onclick and oninput, that run JavaScript when something happens on an element.

ARIA Attributes

States and properties that scripts update to keep custom widgets accessible, such as aria-expanded and aria-live.

Tools

4 tools
JavaScript Validator

Check your code for syntax errors and common problems, such as undefined or unused variables, with the exact line of each one.

JavaScript Minify and Beautify

Lay your code out neatly with consistent indentation, or minify it for a smaller, faster file. Only whitespace and comments change.

JavaScript Regex Tester

Test a regular expression as you type, with matches and groups highlighted, a plain-English explanation and replace and split previews.

JavaScript Key Code and Event Inspector

Press any key to get its key, code and keyCode, or test mouse, touch and pen events with live coordinates and an event log.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee