1
2
3
4
5
6
7
8
|
function typeofTest()
{
var values = ["hi", "hi", "hi", null, 5, 5.1, true, undefined, /foo/, typeofTest, [], {}], types = [];
for (var i = 0; i < values.length; i++)
types[i] = typeof values[i];
return types.toString();
}
assertEq(typeofTest(), "string,string,string,object,number,number,boolean,undefined,object,function,object,object");
|