If you want to limit the value of a number in JavaScript, there is no need to limit whether it is an integer or a floating point number
toExponential() function is to convert the numerical value into a scientific and technical display, for example:
Go to the object properties and object methods of w3cschool values
Number object property
Property Description
constructor returns a reference to the Number function that created this object.
MAX_VALUE The largest number that can be represented.
MIN_VALUE The smallest number that can be represented.
NaN Not a numeric value.
NEGATIVE_INFINITY Negative infinity, this value is returned when overflow occurs.
POSITIVE_INFINITY Positive infinity, this value is returned when overflow occurs.
A prototype gives you the ability to add properties and methods to an object.
Number object method
Method Description
toString Converts a number to a string, using the specified base.
toLocaleString Converts a number to a string, using the local number format sequence.
toFixed converts a number into a string, and the result has the specified number of digits after the decimal point.
toExponential Converts the object's value to exponential notation.
toPrecision formats numbers to the specified length.
valueOf returns the base numeric value of a Number object.
The above is all about the values in JavaScript data types. I hope you will like it.