The JavaScript snippet collection contains a wide variety of ES6 helper functions. Browser snippets include helper functions for selecting, traversing, and manipulating DOM elements, while general-purpose helpers can be found in the JavaScript snippet collection.
Learn the differences between JavaScript ES6 arrow functions and regular functions and how they affect event listener callbacks.
JavaScript, Browser
Learn how to programmatically copy text to clipboard with a few lines of JavaScript and level up your web development skills.
JavaScript, Browser
Creates an object containing the parameters of the current URL.
JavaScript, Browser
Level up your JavaScript logging with these console.log()
tips and tricks.
JavaScript, Browser
Learn all of the options JavaScript provides for modifying the URL of the current page in the browser without reloading the page.
JavaScript, Browser
If you need to check if Caps Lock is on when the user is typing in the browser, JavaScript's got you covered.
JavaScript, Browser
Creates a hash for a value using the SHA-256 algorithm. Returns a promise.
JavaScript, Browser
Ever wanted to get the value of an HTML input element as a number? Learn an easy way to do it with this handy trick.
JavaScript, Browser
Renders the given DOM tree in the specified DOM element.
JavaScript, Browser
Runs a function in a separate thread by using a Web Worker.
JavaScript, String
Converts an hsl()
color string to an object with the values of each color.
JavaScript, String
Converts an rgb()
color string to an object with the values of each color.
JavaScript, String
Changes the lightness value of an hsl()
color string.
JavaScript, Browser
Parses an HTTP Cookie header string, returning an object of all cookie name-value pairs.
JavaScript, Browser
Encodes a set of form elements as a query string.