/js/src/jit-test/tests/basic/typeofTest.js
http://github.com/zpao/v8monkey · JavaScript · 8 lines · 8 code · 0 blank · 0 comment · 1 complexity · b02d6edac89af6ad3ac01f0fbb147565 MD5 · raw file
- 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");