Files
codeql/javascript/extractor/tests/es2015/input/yield.js
2018-11-07 07:48:25 +00:00

5 lines
158 B
JavaScript

function* foo(){
var index = 0;
while(index <= 2) // when index reaches 2, yield's done will be true and its value will be undefined;
yield index++;
}