markTemp.js 875 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. //-maxinterpretcount:1
  6. function test0(){
  7. var obj1 = {};
  8. var strvar2 = 'nj'+'ax'+'io' + 'sj';
  9. var strvar4 = 'yi'+'fc'+'ne' + 'wh';
  10. with (obj1) {
  11. var strvar2 = strvar4;
  12. }
  13. strvar2 +=1;
  14. WScript.Echo("strvar2 = " + (strvar2));
  15. WScript.Echo("strvar4 = " + (strvar4));
  16. };
  17. test0();
  18. //-forcenative
  19. var str = "Pas" + "sed";
  20. function foo() {
  21. var x = "a" + "b";
  22. var y = str;
  23. x = y;
  24. var w = x + " NOT";
  25. use(w);
  26. }
  27. function use(x) {}
  28. foo();
  29. WScript.Echo(str);