Parses a string to a octal number.
string
number
Parses a string to a octal number, returning undefined instead of NaN if it fails.
undefined
NaN
parseOctal("101"); // 0o101 -> 65parseOctal("101.5"); // 0o101 -> 65parseOctal("invalid"); // undefined Copy
parseOctal("101"); // 0o101 -> 65parseOctal("101.5"); // 0o101 -> 65parseOctal("invalid"); // undefined
parseInteger
String to be parsed.
Parsed number or undefined if it fails.
Parses a
string
to a octalnumber
.Remarks
Parses a
string
to a octalnumber
, returningundefined
instead ofNaN
if it fails.Example
See
parseInteger