ObjectHeaderInlining_deleteProps.js 674 B

1234567891011121314151617181920212223
  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. function test(arg0, arg1) {
  6. this.prop0 = arg0;
  7. this.prop1 = arg1;
  8. }
  9. var obj = new test();
  10. delete obj.prop1;
  11. delete obj.prop0;
  12. obj.a = 5;
  13. obj.b = 10;
  14. obj.c = 15;
  15. WScript.Echo(obj.a);
  16. WScript.Echo(obj.b);
  17. WScript.Echo(obj.c);
  18. WScript.Echo(obj.prop0);
  19. WScript.Echo(obj.prop1);