Tag: Javascript

Recent Post

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.

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.

How to exit a JavaScript function

A JavaScript function can be exited by using the 'return' keyword or throwing an error.

Using JSON in JavaScript

With JSON, you can store a JavaScript native object in pure string format.

Using HTML data attributes in JavaScript and CSS

Data attributes allow you to store string data directly on HTML elements.

GET, POST, PUT & DELETE using AJAX in JavaScript

AJAX (XMLHttpRequest) is a native object for making HTTP requests in JavaScript.