deleteProperty.js 646 B

12345678910111213141516
  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. var l = (function () {
  6. function func_0() {
  7. }
  8. delete func_0.length;
  9. Object.defineProperty(Function.prototype, 'length', { writable: true });
  10. func_0.length = 'candy';
  11. return func_0.length;
  12. }());
  13. if (l === 'candy')
  14. WScript.Echo('pass')