toSafeInteger
Modified on Tue, 22 Aug 2023
Description
Use this function to convert a value to a safe integer. A safe integer can be compared and represented correctly.
Syntax
toSafeInteger(value)
Returns
Return Value | Description |
---|---|
Number | Returns the converted value as a safe integer |
Sample
Example | Result | Description |
---|---|---|
toSafeInteger("42.5") | 42 | Returns the converted floating-point value "42.5" as the safe integer 42. |
To view all the Math and Number functions, click here.
See Also
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article