summaryrefslogtreecommitdiff
path: root/js/src/jit-test/tests/basic/typeofTest.js
blob: 90dadbb541e92392e5e0f63ae80effb364195c74 (plain)
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");