pecus’s avatarpecus’s Twitter Archive—№ 5,413

  1. …in reply to @cassidoo
    @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] )
    oh my god twitter doesn’t include alt text from images in their API