Learn the language of the web.

Recent Post

What is a Blob object in JavaScript?

A Blob object is used for accessing, encoding and transferring files and file-like objects.

How to check if a property exists in a JavaScript object

Learn methods for searching an object and its prototype for the existence of properties.

Check if a key exists in localStorage

To check for an item, get the value of the item by querying localStorage by its key.

How to save and retrieve images from localStorage

You can use the FileReader API to create a data URL and pass this through localStorage.

How to create and decode a query string in JavaScript

A query string is used to store string data as part of a URL.

Save user form input data in a JavaScript object

This task is possible in two lines using the FormData constructor and Object.fromEntries()

How to copy an image to the clipboard with vanilla JavaScript

Any image can be copied to the clipboard with a little help from the HTML Canvas API.

How to wait until a page has loaded in JavaScript

Learn about event that allow you to run code upon the completion of page loading states.

Get the IP address of a user in Node.js

You only need a one-liner to get the IP address of a user in Node.js.

Insert an element or HTML block before or after an existing element

Using the insertAdjacentElement() or insertAdjacentHTML() methods.