Message from JavaScript discussions

May 2019

— Anyone??

— 

I think it’s because every object has toString prototype and by default returns a primitive, not an object. So if you overwrite toString to return an object it will fail.

— No, I don’t think it’s related to this group.

— You can't

— Ok

— const f = typeof;
f('foo');

— Doesn't work for typeof

— But works for all functions

— Thank you

— +(4) works, also +4

— Am I using + "as a function"? I think not

— But why can I do typeof(null)