Create a random number between two given numbers
JavaScript Function

How to create a random number between two given numbers and round to the nearest decimal using JavaScript.

Search for a command to run...
JavaScript Function

How to create a random number between two given numbers and round to the nearest decimal using JavaScript.

In today's posts, I will show you two methods on how to remove duplicates from an array. In our first example, we will remove duplicates from our array using a Set. The Set object lets you store unique values of any type, whether primitive values or ...

In this post, I'm going to show you the most efficient way to check for an item value in an Array. In our example, We have an array of users and we want to check if a name exists. Let us start with the some() method (In my view the most efficient w...

In this blog post, I will show you how to create a function to extract numbers from a string. Just like in most of my posts, I ask myself "What do I need to accomplish this?" Let me refer to our blog title and break it down into small tasks. 1) H...

In this post, we will create a function to take an array and element as an argument and return the array with the element at the end of the array. Let's break this down into chunks... We need a function. An array and element are required to pass ...

Ok, let's say we have a list of users who are members of a health club. We want to view all members whose account is active and sorted by age in ascendant format. To keep it simple for this demonstration, we have created an array of 4 items with the...
