Category: Must-know JavaScript

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.

Using JSON in JavaScript

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

Rounding numbers in JavaScript

Rounding methods are available on the Math object and on numeric data.

setTimeout() and setInterval() in JavaScript

setTimeout() and setInterval() allow you to delay the execution of code or run it repeatedly.

Add a new element to the DOM using JavaScript

You can insert HTML elements to the DOM dynamically using JavaScript.

How to call a function with a delay in JavaScript

Learn how you can delay a function call using setTimeout() – and cancel one you've already set.

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

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

How to remove duplicate array values

Two ways you can remove duplicate values from an array.