Calculate SHA-256 hash in JavaScript
Calculate a SHA-256 hash in JavaScript using native APIs in both the browser and Node.js.
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.
Calculate a SHA-256 hash in JavaScript using native APIs in both the browser and Node.js.
The Event Loop is a source of confusion for many developers, but it's a fundamental piece of the JavaScript engine.
Learn the differences between JavaScript ES6 arrow functions and regular functions and how they affect event listener callbacks.
Learn how to programmatically copy text to clipboard with a few lines of JavaScript and level up your web development skills.
Convert the data from an HTML form into a JavaScript object or serialize it into a query string.
Learn how to perform HTTP GET, POST, PUT, and DELETE requests in JavaScript.
Renders the given DOM tree in the specified DOM element.
Generate a UUID in JavaScript using native APIs in both the browser and Node.js.
Learn how to parse or serialize a cookie with JavaScript, quickly and effectively.
While these two properties are very similar, there are some key differences that you should be aware of.
Level up your JavaScript logging with these console.log()
tips and tricks.
Creates an object containing the parameters of the current URL.
Learn how to add or remove event listeners from elements with ease.
Ever wanted to show or hide one or more elements in HTML, using JavaScript? Turns out it's very easy to do so.
Creates a pub/sub event hub with emit, on, and off methods.
Adds multiple event listeners with the same handler to an element.
Understand how events work in JavaScript and learn when to use event bubbling, event capturing and event delegation with this short guide.
Ever needed to convert a NodeList
to an array in JavaScript? Here's the fastest way to do so.
Not sure if you need to prefix a CSS property in order to use it? Here's a simple way to figure it out!
If you need to check if Caps Lock is on when the user is typing in the browser, JavaScript's got you covered.
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.
Returns an array containing all the siblings of the given element.
A simple trick to remove one or more attributes from an HTML element.
Learn how to trigger an event on an HTML element using JavaScript.