3 ms·
I got two out of two and then stopped. This is another "look how many weird results we can get out of javascript" exercise. Gary Bernhardt covered this humoro
by grannyg00se 13y ago
I got two out of two and then stopped. This is another "look how many weird results we can get out of javascript" exercise.
Gary Bernhardt covered this humorously here:
https://www.destroyallsoftware.com/talks/wat https://www.destroyallsoftware.com/talks/wat
And Crockford covers some issues more formally in his talks.
The takeaway is that if you do something that can possibly be interpreted in a strange way, javascript is mostly likely going to interpret it in a way that you didn't expect. You could say it sucks because of that and/or you can look at the ecmascript standard and try to reason about it. But either way, it's best not to do anything even slightly ambiguous. Stick to the good parts.