In this tutorial, we will learn how to use the if-else statement in JavaScript. We will create one simple number comparator application. The user will have to enter two numbers on two input fields. It will have one button to find out the maximum number. If the user will click on the button, it will show us the maximum number that was entered.
ReadFinding out if a substring exists in a string or not is required in most development projects. There are a couple of different ways to check this in JavaScript. In this tutorial, we will learn three different ways in Javascript to find if a substring exists in a String or not. or not
ReadA positive integer is called a perfect number if the sum of its proper divisors excluding the number is equal to that number. That means, it is half of the sum of all the positive divisors including the number.
ReadMost of the time we need to manipulate array objects like removing an element from an array. We can either remove an element and change the original array or we can create one different array by changing the original.There are several ways to remove one or more element from an array. Let's go through each one of them one by one.
ReadAs we know, string is immutable, so if we need to reverse a string, we can't just change the position of all characters. In this tutorial, we will learn how to reverse a string in Javascript. I will show you the exact steps required to reverse a string and how to do it in one line. Let's take a look :.
Read