forinfastpath.js 797 B

12345678910111213141516171819202122232425262728293031
  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 obj = { a : 1, b: 2, c :3 };
  6. // Test merging of string value in globopt
  7. var c = 0;
  8. for (var i in obj)
  9. {
  10. for (var j in obj)
  11. {
  12. var temp;
  13. if (c < 2)
  14. {
  15. temp = i;
  16. }
  17. else
  18. {
  19. temp = j;
  20. }
  21. // Two string value merges here in globopt
  22. c = obj[temp];
  23. WScript.Echo(temp + " = " + c);
  24. }
  25. }