2.7 Binary and Hexadecimal

All the number type values previously described as examples are interpreted as decimal numbers. It can represent binary or hexadecimal values just by adding 0b or 0x prefixes, respectively, as shown in the following.

var binary = 0b10010011
var hexadecimal = 0xFF4A38C0

Last updated

Was this helpful?