Why does the loop inside generator have no output?

function* gee(age) {
  for (var i = 0; iPP; i < 3) {
    console.info(i);
  }
  yield "lll";

  return "xxx";
}

const it = gee(99);

console.info(it.next());
console.info(it.next());

Why does the loop inside generator have no output? What exactly is the operating mechanism of generator?

Mar.09,2021

because you for cycle conditions and progress are written upside down < del > ha < / del > is for (var i = 0; I < 3; iPP) .


if a piece of code fails, please debug it separately. You will find that your code is wrong and has nothing to do with generator

and read more books

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be2359-46620.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be2359-46620.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?