Helper method : given two unequal sized bit strings , converts them to same length by adding leading 0 s in the smaller string . Returns the the new length
let s1 , s2 ; function makeEqualLength ( ) { let len_a = s1 . length ; let len_b = s2 . length ; let num_zeros = Math . abs ( len_a - len_b ) ; if ( len_a < len_b ) { for ( let i = 0 ; i < num_zeros ; i ++ ) { s1 = ' ' + s1 ; }