michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * For each VariableDeclaration or VariableDeclarationNoIn in the michael@0: * code, create a property of the variable object whose name is the Identifier michael@0: * in the VariableDeclaration or VariableDeclarationNoIn, whose value is michael@0: * undefined and whose attributes are determined by the type of code michael@0: * michael@0: * @path ch10/10.2/10.2.1/S10.2.1_A5.1_T1.js michael@0: * @description Checking variable existence only michael@0: */ michael@0: michael@0: //CHECK#1 michael@0: function f1(){ michael@0: var x; michael@0: michael@0: return typeof x; michael@0: } michael@0: michael@0: if(!(f1() === "undefined")){ michael@0: $PRINT('#1: f1() === "undefined"'); michael@0: } michael@0: michael@0: //CHECK#2 michael@0: function f2(){ michael@0: var x; michael@0: michael@0: return x; michael@0: } michael@0: michael@0: if(!(f2() === undefined)){ michael@0: $PRINT('#1: f2() === undefined'); michael@0: } michael@0: