decoct() function takes a given decimal number and returns a
string version of the corresponding octal value. An octal value is from the
base-8 numerical system, which only uses eight digits: zero through seven. For 32-bit platforms,
4294967295 is the largest number that can be computed. For 64-bit platforms,
9223372036854775807 is the largest number that can be computed.
number: The decimal to convert.
This example uses the
decoct() function to convert a decimal to its octal value:
The above example will result in the following output:
The following Codebyte example can be run and calls the
decoct() method two times. The first call uses the maximum value that can be converted for a 32-bit platform.