2 var func = function() { };
3 var func2 = function() { return 42; };
6 for (var i = 0; i < 1000000; ++i) {
7 var value1 = (i & 1) ? func : func2;
8 var value2 = (i & 1) ? object : "hello";
9 result += (typeof value1 == "function");
10 result += (typeof value2 == "function") << 1;
12 if (result != 1000000)
13 throw "Error: bad result: " + result;