9 ms·
I thought about how I'd do this in JS, and it's paradoxically more compact and less confusing without dedicated syntax: if (leaders.some(i => i == "Yang")) {
by slver 6y ago
I thought about how I'd do this in JS, and it's paradoxically more compact and less confusing without dedicated syntax:
if (leaders.some(i => i == "Yang")) {
alert("Yang is a leader!");
} else {
alert("Not found Yang!");
}