Year: 2022

Recent Post

Check if a HTML input element contains (no) user input

How to check if a user has provided input to a HTML input element.

Understanding JavaScript closures with simple examples

A JavaScript closure is a function that has its own protected, 'private' variables.

How to sort an array of objects by the value of a property in JavaScript

Learn how to sort an array of objects by the value of a property.

Using Axios to make HTTP requests (GET, POST, PUT & DELETE)

Axios allows you to make HTTP requests with minimal syntax.

Print the contents of a JavaScript object to the DOM

Printing a JavaScript object to the DOM is harder than you might think.

Insert content to DOM at script tag location

Learn how to get and insert content to the DOM at the location of a script tag.

POST form data using JavaScript’s Fetch API

Fully control form data submission using JavaScript's Fetch API.

Emptying a JavaScript array

Emptying an array is easy, but methods vary in their impact on references made to the array in other

Find the index of an element in a JavaScript array by value

Get the index value of any element in an array by value and instance of its appearance.

HTML Table of Contents Generator

A JavaScript solution for generating a table of contents for HTML content.