The closest I've seen to that sort of wackiness is putting function pointers in an array and then indexing them, like so.
logTrue = () => console.log("It's true");
logFalse = () => console.log("It's false");
var foo = [logFalse, logTrue]
foo[+true]() //Chrome doesn't convert directly from true to 1, so have to do this to convert it.
/// "It's true"
It's clever, but I would absolutely not allow it in production code.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The closest I've seen to that sort of wackiness is putting function pointers in an array and then indexing them, like so.
It's clever, but I would absolutely not allow it in production code.