📅  最后修改于: 2022-03-11 15:03:25.189000             🧑  作者: Mango
XO = str =>
[...str].reduce(
(acc, c) => acc + (c == 'x' || c == 'X' ? 1 : 0) - (c == 'o' || c == 'O' ? 1 : 0),
0
) == 0;