eval-strict-delete.js 785 B

1234567891011121314151617
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. "use strict"
  6. var indirect = eval;
  7. indirect("var _et_ = 10;");
  8. WScript.Echo(_et_);
  9. WScript.Echo(eval("delete this._et_;"));
  10. WScript.Echo(typeof _et_);
  11. (function (global) {
  12. indirect("var _et_ = 10;");
  13. WScript.Echo(Object.getOwnPropertyDescriptor(global, "_et_").configurable); //Configurability is false for Chakra and true for Chrome & Firefox
  14. WScript.Echo(delete global._et_);
  15. })(this);