In this tutorial, you will learn how to round a decimal to the nearest whole number in javascript. Rounding a decimal number means getting rid of decimals in a number and adjusting it to the nearest whole number to make the calculations easier. For example, 1.78 after rounding off will become 2. Rounding a decimal

In this tutorial, you will learn how to get the absolute value of a number in javascript. Absolute value is measured based on the distance from zero that a number is on the number line, without taking direction in consideration. In layman terms, the value that you get after removing any negative sign in front

In this tutorial, you will learn how to check if a number is positive or negative in javascript. The numbers below zero are negative numbers and similarly, the numbers above zero are positive numbers. For example, 1 is a positive number and -1 is a negative number. A negative number is always prefixed with a

In this tutorial, you will learn how to get Pi value in javascript. Pi is a constant in mathematics that represents the ratio of the circumference of any circle to the diameter of that circle. To get the value of Pi, we can make use of the Math object. This object contains a lot of

In this tutorial, you will learn how to find cube of a number in javascript. To get the cube of a number, we have to multiply the number by itself thrice. For example, the cube of 3 is 9, as 3 × 3 x 3 = 9. Calculating the cube of a number can be