dop1.js 629 B

123456789101112131415161718
  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. const x = "let x";
  6. Object.seal(this);
  7. try {
  8. Object.defineProperty(this, 'x', {value:'20', configurable: true });
  9. }
  10. catch(e) {
  11. WScript.Echo("exception: " + e);
  12. }
  13. WScript.Echo(x);
  14. WScript.Echo(this.x);
  15. WScript.Echo(Object.isSealed(this));