concat_empty.js 613 B

12345678910111213141516171819202122
  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. WScript.Echo("Concatenation of empty strings.");
  6. var x = "";
  7. var y = "";
  8. x += y;
  9. x = x + y;
  10. x += "";
  11. y += "";
  12. x = x = "";
  13. for(var i = 0; i < 10000; ++i)
  14. {
  15. x += x + y + x + y + x + "";
  16. }
  17. WScript.Echo("{" + x + "}");