Sign in
webkit
/
WebKit
/
b9162d12b78084f32d6be3941333bdce5145feba
/
.
/
JSTests
/
es6
/
for..of_loops_with_generator_instances.js
blob: 221784e4e3fddb95b770c4547b5a565da2859834 [
file
] [
log
] [
blame
]
function
test
()
{
var
result
=
""
;
var
iterable
=
(
function
*(){
yield
1
;
yield
2
;
yield
3
;
}());
for
(
var
item of iterable
)
{
result
+=
item
;
}
return
result
===
"123"
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);