num.parse()
num.parse(s) converts the string s to a number by parsing it as a base-10 floating point number.
Returns
if
sis a number, returns the number unchanged.if
sis a string, attempts to parse it as a base-10 floating point number. Returns the parsed number on success, ornullif the string cannot be parsed.if
sis any other type, returnsnull.
Last updated
Was this helpful?