DeleteProperty1.js 666 B

12345678910111213141516171819202122232425
  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 x = {a:0, b:10, c:20};
  6. for (i in x)
  7. {
  8. WScript.Echo(i + " = " + x[i]);
  9. }
  10. delete x.b;
  11. for (i in x)
  12. {
  13. WScript.Echo(i + " = " + x[i]);
  14. }
  15. x.b = 23;
  16. for (i in x)
  17. {
  18. WScript.Echo(i + " = " + x[i]);
  19. }
  20. delete x.b;
  21. for (i in x)
  22. {
  23. WScript.Echo(i + " = " + x[i]);
  24. }