Using Number.EPSILON property to coding in Javascript/JS

This JavaScript tutorial explains how to use the Number property called EPSILON with syntax and examples.


In JavaScript, EPSILON is a static property of the Number object that is used to return the smallest fantastic range drawing close zero (ie: a tremendous infinitesimal quantity). Because EPSILON is a property of the Number object, it must be invoked through the object referred to as Number.


In JavaScript, the syntax for the EPSILON property is:


Parameters or Arguments

There are no parameters or arguments for the EPSILON property.


The EPSILON property returns an approximate value of 2.220446049250313e-16.


The EPSILON property is a property of the Number object and now not a wide variety function. However, we have protected the EPSILON property within our JS Number Methods section because you will most in all likelihood use this property in conjunction with the Number techniques discovered in this section.


Let’s take a seem at an instance of how to use the EPSILON property in JavaScript.

For example:


In this example, we have invoked the EPSILON property the usage of the Number class.

We have written the output of the EPSILON property to the net browser console log, for demonstration purposes, to exhibit what the EPSILON property returns.

The following will be output to the net browser console log:


In this example, the EPSILON property back a price of 2.220446049250313e-16 which represents the smallest wonderful range in JavaScript that is approaching zero.