Historic reason for typeof null: 0 was type tag of objects, null was NULL pointer. Only source I could find. Others?https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof …
@simevidas That is not true — they tried it for ES6 but it broke too many scripts. +@rauschma
-
-
@mathias@simevidas There may be a way to opt into a fix. I find typeof very strange, would love instanceof to do everything. - 1 more reply
New conversation -
-
-
@mathias@simevidas Once I have time, I’ll turn this into a library. Maybe it catches on: http://www.2ality.com/2013/02/isinstance.html …Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
-
@simevidas@mathias Hadn’t thought about it this way, but true: missed chance.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.