Learn the language of the web.

Recent Post

Save user form input data in a JavaScript object

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

Get image from an API call with JavaScript

Create a temporary URL to the retrieved image file in memory.

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.

Get user location by IP address with JavaScript

Location by IP can resolved by a third-party service or in Node.js.

Typewriter typing effect with JavaScript

Make text appear on screen as if it is being typed live using the setInterval() function!

How to read and display a PDF using JavaScript

The native FileReader API can be used to read a PDF and create a URL to its contents.

What’s wrong with using ‘var’ in JavaScript?

Using 'var' to declare variables can lead to scope leakage and silent errors in your code.