// these are safe to use in strict mode
'use strict'
/*
binary
preceded by 0b
string sequence of 0s and 1s
*/
const binary22 = 0b10110 // 22
/*
hexadecimal
preceded by 0x
string sequence of chars between 0-9,A-F
*/
const hexadecimal4602 = 0x11FA // 4602
/*
octal
preceded by 0o
string sequence of chars between 0-7
*/
const octal5075 = 0o11723 // 5075
Last active
December 4, 2020 06:51
-
-
Save rpivo/138403dc1ccc7502558c28f2b26a47aa to your computer and use it in GitHub Desktop.
Binary, Hexadecimal, & Octal Numbers in JS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment