2
0

arguments_assignment.js 693 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 go = { foo: 1, print: function () { } };
  6. function test1() {
  7. for (var i = 0; i < 2; ++i) {
  8. if (i % 2 == 1) {
  9. go.print();
  10. x = go.foo;
  11. } else {
  12. arguments = 1;
  13. }
  14. };
  15. WScript.Echo(arguments);
  16. };
  17. test1();
  18. go.bar = 1;
  19. test1();