3 ms·
It sounds like the interviewer did this person a favor. It's a clever trick, and I've abused toString and toJSON for plenty, but if this is a "major tech compan
by natecavanaugh 9y ago
It sounds like the interviewer did this person a favor. It's a clever trick, and I've abused toString and toJSON for plenty, but if this is a "major tech company", do you really think it's a great workplace if they think being able to read incomprehensible code, and instead of fixing said code, they use it as a filter?
I doubt they have that code in production, but even then, devs that are enamored with hacks like this and knowing pedantic answers to trick questions, chances are, their coding style will reflect just how "clever" they think they are.