| // Copyright (C) 2014 the V8 project authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| Unmapped arguments object mutation via alias during traversal using for..of |
| "Unmapped" arguments objects should be able to be traversed using a |
| `for..of` loop, and dynamic changes to the formal parameters should not be |
| reflected in the iterated values. |
| var expected = [1, 2, 3]; |
| for (var value of arguments) { |
| assert.sameValue(value, expected[i], 'argument at index ' + i); |
| assert.sameValue(i, 3, 'Visits all arguments'); |