Programming-Idioms

History of Idiom 76 > diff from v37 to v38

Edit summary for version 38 :
New JS implementation by user [Worms]

Version 37

2016-01-01, 01:32:25

Version 38

2016-02-16, 20:27:17

Idiom #76 Binary digits from an integer

Create the string s of integer x written in base 2.

E.g. 13 -> "1101"

Idiom #76 Binary digits from an integer

Create the string s of integer x written in base 2.

E.g. 13 -> "1101"

Code
var base10number = 123

var base2number = base10number.toString(2)