Learn the language of the web.

Recent Post

How to exit a JavaScript function

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

How to exit a loop in JavaScript

You can exit from the execution of a loop by using the 'break' keyword.

Semicolons in JavaScript: Are they necessary?

Semicolons are often optional, but sometimes their omission can break code!

Styling HTML Elements with JavaScript

JavaScript can style HTML elements directly or indirectly via the class attribute.

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.

POST form data (also including a file) using Axios

Make a POST request containing form data as the payload using Axios.

Get image dimensions using JavaScript

How to get the dimensions of an image from a DOM element or URL alone.

Preview a user image before it is uploaded

How to preview an image and check its dimensions and size before uploading.