# Tag Archives: javascript-math

## How to create slider to map a range of values in JavaScript ?

The task is to map a range of values to another range of values like map (0-100) to (100-10000000) in JavaScript. There are two approaches… Read More »

## How to add float numbers using JavaScript ?

Given two or more numbers and the task is to get the float addition in the desired format with the help of JavaScript. There are… Read More »

## Round off a number to the next multiple of 5 using JavaScript

Given a positive integer n and the task is to round the number to the next whole number having divisible by 5. Examples: Input :… Read More »

## Convert a negative number to positive in JavaScript

We can convert a negative number to a positive number in javascript by the methods described below. Method 1: This is a general method in… Read More »

## Find quotient and remainder by dividing an integer in JavaScript

There are various methods to divide an integer number by another number and get its quotient and remainder. Example 1: This example uses the Math.floor()… Read More »

## How to convert a float number to the whole number in JavaScript?

There are various methods to convert float number to the whole number in JavaScript. Math.floor (floating argument): Round off the number passed as parameter to… Read More »

## JavaScript | Random

The Math.random() function is used to return a floating-point pseudo-random number between range [0,1) , 0 (inclusive) and 1 (exclusive). This random number can be… Read More »

## JavaScript | Math Object

The Math object is used to perform mathematical operations on numbers. There are many math object properties which are listed below: Property Description Math.E Euler’s… Read More »

## RMS Value Of Array in JavaScript

The RMS (Root mean square) value of a distribution is the square root of the mean of the squares of the elements. The formula to… Read More »

## JavaScript | Responsive time of an event

Responsive time of an event is the time taken to load the result of that event and time taken to start that event. In this… Read More »

## JavaScript | Math.log1p()

The Math.log1p() is an inbuilt function in JavaScript which gives the value of natural logarithm of 1 + p number. Natural logarithm is of base… Read More »

## JavaScript | array.flatMap()

The array.flatMap() is an inbuilt function in JavaScript which is used to flatten the input array element into a new array. This method first of… Read More »

## JavaScript to generate random hex codes of color

What is hex code? A hex code is a six-digit, three-byte hexadecimal number used to represent colors in HTML, CSS, SVG. The bytes represent the… Read More »

## JavaScript Math LN2 Property

Below is the example of the Math LN2() Method. Example: filter_none edit close play_arrow link brightness_4 code <script>   // Here value of Math.LN2 is printed.… Read More »

## JavaScript | Number.MAX_VALUE & Number.MIN_VALUE with Examples

Number.MAX_VALUE and Number.MIN_VALUE are used to represent maximum and minimum numeric value in javascript. Syntax Number.MAX_VALUE Number.MIN_VALUE Return Type Both Number.MAX_VALUE and Number.MIN_VALUE returns a… Read More »