static /** number */ distance(/** string */ a, /** string */ b) {
    if (a.length !== b.length) return -1;

    let result = 0;
    for (let i = 0; i < a.length; i++) {
      if (a[i] !== b[i])
        result++;
    }
    
    return result;
  }
// The Hamming distance between a and b, or -1 if they aren't of equal length

The Hamming distance between a and b, or -1 if they aren't of equal length
The Hamming distance between a and b or - 1 if they aren ' t of equal length
static  distance( a,  b) {
    if (a.length !== b.length) return -1;
    let result = 0;
    for (let i = 0; i < a.length; i++) {
      if (a[i] !== b[i])
        result++;
    }
    return result;
  }
static distance ( a , b ) { if ( a . length !== b . length ) return - 1 ; let result = 0 ; for ( let i = 0 ; i < a . length ; i ++ ) { if ( a [ i ] !== b [ i ] ) result ++ ; } return result ; }
The Hamming distance between a and b, or -1 if they aren't of equal length
The Hamming distance between a and b or - 1 if they aren ' t of equal length
/** number */ /** string */ /** string */