re: Daily Challenge #29 - Xs and Os VIEW POST

FULL DISCUSSION
 

My solution in js


const XO = (str) => {
  const countX = (`${str}`.match(/x/gi) || '').length,
    countO = (`${str}`.match(/o/gi) || '').length;
  return countX === countO;
};

code of conduct - report abuse