toNumber
Modified on Tue, 22 Aug 2023
Description
Use this function to convert a value to a number.
Syntax
toNumber(value)
Returns
Return Value | Description |
---|---|
Number | Returns the converted value as a number |
Sample
Example | Result | Description |
---|---|---|
toNumber("42") | 42 | Returns the converted string value "42" as the number 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