loading...

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

TOP OF THREAD FULL DISCUSSION
re: How about a reduce to keep it in one loop? (JS) XO = str => [...str].reduce( (acc, c) => acc + (c == 'x' || c == 'X') - (c == 'o' ||...
 

Oh, nice! I wouldn't have thought to use the array spread syntax to get the array of characters. 🎩✨

Code of Conduct Report abuse