DEV Community

Discussion on: Daily Challenge #29 - Xs and Os

Collapse
 
savagepixie profile image
SavagePixie

Hmmm... Something like this might work in JavaScript

const checkXO = str => str.match(/x/gi).length == str.match(/o/gi).length