code: function removezeros(bin){
    var i = 0;
    while((i < bin.length) && (!bin[i])){i++;}
    if(i == bin.length){
      return filledarray(false, 1);
    }else{
      return bin.slice(i);
    }
  }
docs: Removes all prefixing zeros from the binary array.