2.1.30 [ECMA-262-1999] Section 11.4.3, The typeof Operator
V0047:
The production UnaryExpression : typeof UnaryExpression is evaluated as follows:
Evaluate UnaryExpression.
If Type(Result(1)) is not Reference, go to step 4.
If GetBase(Result(1)) is null, return "undefined".
Call GetValue(Result(1)).
Return a string determined by Type(Result(4)) according to the following table:
Type
Result
Undefined
"undefined"
Null
"object"
Boolean
"boolean"
Number
"number"
String
"string"
__SafeArray__
__"unknown"__
__VarDate__
__"date"__
Object (native and doesn't implement [[Call]])
"object"
Object (native and implements [[Call]])
"function"
Object (host)
Implementation-dependent
JScript 5.x returns object for all host objects including those that implement [[Call]].