Javascript Number.MIN_VALUE

Introduction

The Javascript Number.MIN_VALUE represents the smallest positive value representable in JavaScript.

The following code divides two numeric values.

Check the result is greater than or equal to MIN_VALUE.

let num1 = 2;//  w  w  w. j  a v  a 2s .c o  m
let num2 = 2;
if (num1 / num2 >= Number.MIN_VALUE) {
  console.log("larger or equals to Number.MIN_VALUE");
} else {
  console.log("less than Number.MIN_VALUE");
}



PreviousNext

Related