test/script/basic/es6/let-eval.js

Print this page




  79 
  80     try {
  81         print(a, b, c);
  82     } catch (e) {
  83         print(e);
  84     }
  85 
  86     let x;
  87 
  88     try {
  89         print(a, b, c, x);
  90     } catch (e) {
  91         print(e);
  92     }
  93 
  94 }
  95 
  96 f();
  97 
  98 print(typeof a, typeof b, typeof c, typeof x, typeof z);








  79 
  80     try {
  81         print(a, b, c);
  82     } catch (e) {
  83         print(e);
  84     }
  85 
  86     let x;
  87 
  88     try {
  89         print(a, b, c, x);
  90     } catch (e) {
  91         print(e);
  92     }
  93 
  94 }
  95 
  96 f();
  97 
  98 print(typeof a, typeof b, typeof c, typeof x, typeof z);
  99 
 100 let v = 1;
 101 eval("print('v: ' + v); v = 2; print ('v: ' + v);");
 102 print("this.v: " + this.v);
 103 print("v: " + v);
 104