Edit The Code:
See Result »
Try it Yourself - ©
w3ii.com
The toString() method can output numbers as base 16 (hex), base 8 (octal), or base 2 (binary).
Try it