tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S10.2.1_A5.2_T1.js (636B)


      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    If there is already a property of the variable object with the
      7    name of a declared variable, the value of the property and its attributes
      8    are not changed
      9 es5id: 10.2.1_A5.2_T1
     10 description: >
     11    Checking existence of the variable object property with formal
     12    parameter
     13 ---*/
     14 
     15 //CHECK#1
     16 function f1(x){
     17  var x;
     18  
     19  return typeof x;
     20 }
     21 
     22 assert.sameValue(f1(1), "number");
     23 
     24 //CHECK#2
     25 function f2(x){
     26  var x;
     27  
     28  return x;
     29 }
     30 
     31 assert.sameValue(f2(1), 1);
     32 
     33 reportCompare(0, 0);