function XO (string) {
  var os = string.match(/o/gi);
  var xs = string.match(/x/gi);
  if ((os || xs) && !(os && xs))
  {
    return false;
  } else {
    return !os && !xs || os.length === xs.length;
  }
}
// Check to see if a string has the same amount of 'x's and 'o's. The method must return a boolean and be case insensitive. The string can contains any char.
Check to see if a string has the same amount of 'x's and 'o's. The method must return a boolean and be case insensitive. The string can contains any char.
Check to see if a string has the same amount of ' x ' s and ' o ' s . The method must return a boolean and be case insensitive . The string can contains any char .
function XO (string) {
  var os = string.match(/o/gi);
  var xs = string.match(/x/gi);
  if ((os || xs) && !(os && xs))
  {
    return false;
  } else {
    return !os && !xs || os.length === xs.length;
  }
}
function XO ( string ) { var os = string . match ( / o / gi ) ; var xs = string . match ( / x / gi ) ; if ( ( os || xs ) && ! ( os && xs ) ) { return false ; } else { return ! os && ! xs || os . length === xs . length ; } }
Check to see if a string has the same amount of 'x's and 'o's.
Check to see if a string has the same amount of ' x ' s and ' o ' s .