Attempts to coerce the specified value to a number. If the value cannot be coerced to a valid number, returns the specified fallback value.
value
fallback
Value to coerce to a number.
Optional
Value to return if the specified value cannot be coerced to a number.
The specified value as a number if valid, otherwise the specified fallback.
Attempts to coerce the specified
value
to a number. If the value cannot be coerced to a valid number, returns the specifiedfallback
value.