LeftDead.js 707 B

12345678910111213141516171819202122232425262728
  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 w;
  6. function RunTest()
  7. {
  8. var x = "Left" + "Dead";
  9. var y;
  10. if (x) {
  11. y = x;
  12. x = x + " ZOMBIE";
  13. }
  14. w = x + " ALIVE!";
  15. return y + "";
  16. }
  17. var res = RunTest();
  18. if (res !== "LeftDead")
  19. {
  20. WScript.Echo(res);
  21. WScript.Echo("FAILED");
  22. }
  23. else
  24. {
  25. WScript.Echo("Passed");
  26. }