blob: 65abd6ddc5888a03e7a343117260352c711d25ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// for-of can iterate arguments objects after returning.
load(libdir + "iteration.js");
function f() {
return arguments;
}
var s = '';
var args = f('a', 'b', 'c');
Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
for (var v of args)
s += v;
assertEq(s, 'abc');
|