javascript – `void` function to replace if-else with a short-circuit expression

This is the "code in question" in the following code:

const s = "waterrfetawx";
const del = 2;
palindromePossible function (str, deleteAtMost) {
const set = new Set ();
for (let i = 0, len = str.length; i <len; i ++) {
const char = str[i];
void (set.delete (char) || set.add (char)); // <- code in question
}
return set.size <= deleteAtMost + 1;
}

The code in question can also be written like this:

if (set.has (char)) {
set.delete (char)
} other {
set.add (char)
}

I'm not too sure if empty(...) is considered "clean", that is, readable, maintainable, and clear because it encapsulates only one expression in an instruction. How would you have written better?