JavaScript Number toExponential() Method Last Updated : 22 May, 2023 Comments Improve Suggest changes Like Article Like Report JavaScript Number toExponential() method is used to convert a number to its exponential form. It returns a string representing the Number object in exponential notation. The toExponential() method is used with a number as shown in the above syntax using the ‘.’ operator. This method will convert a number to its exponential form. Syntax: number.toExponential(value) Parameters: This method accepts a single parameter value. value: It is an optional parameter and it represents the value specifying the number of digits after the decimal point. Return Value: The toExponential() method in JavaScript returns a string representing the given number in exponential notation with one digit before the decimal point. Below is an example of the Number toExponential() Method: Example 1: JavaScript let num = 212.13456; console.log(num.toExponential(4)); Output: Output :2.1213e+2 Example 2: Passing a number as an argument in the toExponential() method. If a number is passed as an argument to the toExponential() method then it represents the number of digits after the decimal point. JavaScript let num = 2.13456; console.log(num.toExponential(2)); Output: 2.13e+0 Example 3: Passing no parameter in the toExponential() method. The below program illustrates this. JavaScript let num = 2.13456; console.log(num.toExponential()); Output: 2.13456e+0 Example 4: Passing a value that has more than 1 digit before the decimal point in the toExponential() method. The below program illustrates this:. JavaScript let num=212.13456; console.log(num.toExponential()); Output: 2.1213456e+2 Example 5: Passing zero as a parameter in the toExponential() method. The below program illustrates this. JavaScript let num = 212.13456; console.log(num.toExponential(0)); Output: Output :2e+2 Exceptions: Range Error: This exception is thrown when the value parameter passed is too small or too large. Values between 0 and 20, inclusive, will not cause a RangeError. If you want to pass larger or smaller values than specified by this range then you have to accordingly implement the toExponential() method.Type Error: This exception is thrown when the toFixed() method is invoked on an object that is not of type number. Supported Browsers: Google Chrome 1 and aboveInternet Explorer 5.5 and aboveFirefox 1 and aboveApple Safari 2 and aboveOpera 7 and above We have a complete list of JavaScript Number constructor, properties, and methods list, to know more about the numbers please go through that article. Comment More infoAdvertise with us S Shubrodeep Banerjee Follow Improve Article Tags : Misc JavaScript Web Technologies JavaScript-Numbers JavaScript-Methods +1 More Practice Tags : Misc Similar Reads JavaScript Number() Constructor Javascript Number() Constructor is used to create a new number object but, if we call it as a function on another data type it will perform type conversion to number if possible. Syntax: Number(object) Parameters: This function accepts a single parameter as mentioned above and described below: objec 2 min read JavaScript Number constructor Property JavaScript Number constructor Property is used to return the number constructor function for the object. The function which is returned by this property is just the reference to this function, not a number containing the functionâs name. The JavaScript number constructor, string constructor, and boo 1 min read JavaScript Number EPSILON Property EPSILON property shows the difference between 1 and the smallest floating point number which is greater than 1. When we calculate the value of EPSILON property we found it as 2 to the power -52 (2^-52) which gives us a value of 2.2204460492503130808472633361816E-16. Syntax: Number.EPSILON Attribute: 2 min read JavaScript Number MAX_SAFE_INTEGER Property The JavaScript Number.MAX_SAFE_INTEGER is a constant number that represents the maximum safe integer. This constant has a value of (253 - 1). Here safe refers to the ability to represent integers and to compare them. Syntax: Number.MAX_SAFE_INTEGER Return Value: A constant number. Example 1: Below e 1 min read JavaScript Number MAX_VALUE & MIN_VALUE Property JavaScript Number.MAX_VALUE and Number.MIN_VALUE is used to represent maximum and minimum numeric values in javascript. Syntax: Number.MAX_VALUE Number.MIN_VALUE Return Type: Both Number.MAX_VALUE and Number.MIN_VALUE returns a numeric value. MAX_VALUE has a value of approximately 1.79E+308. The val 1 min read JavaScript Number.MIN_SAFE_INTEGER Property The JavaScript Number.MIN_SAFE_INTEGER is a constant number that represents the minimum safe integer. This constant has a value of (-(253 - 1)). Use Number.MIN_SAFE_INTEGER, as a property of a number object because it is a static property of a number. Syntax: Number.MIN_SAFE_INTEGER Return Value: Co 1 min read JavaScript NaN Property NaN, which stands for "Not a Number," is a special value in JavaScript that shows up when a mathematical operation can't return a valid number. This can happen if you try something like dividing zero by zero or converting a string that doesn't contain numbers. NaN helps you spot when something went 2 min read JavaScript Number NEGATIVE_INFINITY Property In JavaScript, NEGATIVE_INFINITY is a property of a number object which represents negative infinity (-Infinity). It can be explained as a number that is lower than any other number. It is a Read-Only property. Syntax: NEGATIVE_INFINITY is a static property of the NUMBER object and hence is always u 1 min read JavaScript Number Positive_INFINITY Property In javascript Number.POSITIVE_INFINITY represents the largest positive value i.e positive infinity. Actually the value of Number.POSITIVE_INFINITY is the same as the value of the global object's Infinity property. Syntax: It can be assigned to a variable in the following way. let a = Number.POSITIVE 2 min read JavaScript Number.isNaN() Method In JavaScript NaN is stand for Not-a-Number. The Number.isNaN() method returns true if a value is NaN. This method checks whether the passed value is NaN and of type Number, ensuring accurate identification of invalid numeric values. Syntax Number.isNaN(value)Parameters Value: It is the value that i 2 min read Like