S10.1.1_A1_T3.js (674B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: | 6 Program functions are defined in source text by a FunctionDeclaration or created dynamically either 7 by using a FunctionExpression or by using the built-in Function object as a constructor 8 es5id: 10.1.1_A1_T3 9 description: > 10 Creating function dynamically by using the built-in Function 11 object as a constructor 12 ---*/ 13 14 var x = new function f1() { 15 return 1; 16 }; 17 18 assert.sameValue( 19 typeof(x.constructor), 20 "function", 21 'The value of `typeof(x.constructor)` is expected to be "function"' 22 ); 23 24 reportCompare(0, 0);