-
@cassidoo so here's my lazy answer to this week interview question (most likely already posted):
const tob1 = int => int.toString(2).replace(/0/g, '') const sortBits = (numbers = []) => numbers.sort((a,b) => tob1(a) - tob1(b)) console.log( sortBits([0,1,2,3,4,5,6,7,8] )
