Skip to content

Instantly share code, notes, and snippets.

View Mayankgupta688's full-sized avatar
💭
Corporate and Online Trainer with 8+ years of Experience...

Mayank Gupta Mayankgupta688

💭
Corporate and Online Trainer with 8+ years of Experience...
View GitHub Profile
function* customGenerator() {
yield 1;
yield 2;
yield 3;
}
var getIterator = customGenerator();
function* customGenerator() {
yield 1;
yield 2;
yield 3;
}
var getIterator = customGenerator();
function* customGenerator() {
yield 1;
yield 2;
yield 3;
}
var getIterator = customGenerator();
function* customGenerator() {
yield 1;
yield 2;
yield 3;
}
let getIterator = customGenerator();
let firstValue = getIterator.next();
function* customGenerator() {
yield 1;
yield 2;
yield 3;
}
let getIterator = customGenerator();
let nextValue = null;
function* customGenerator() {
yield 1;
return 5;
yield 2;
}
let getIterator = customGenerator();
function* customGenerator() {
let x = yield 1;
yield x + 1
}
let getIterator = customGenerator();
let nextValue = null;
function normalFunction() {
console.log("1");
console.log("2");
console.log("3");
console.log("4");
console.log("5");
}
normalFunction();
function *iterateGenerator() {
yield "1";
yield "2";
yield "3";
yield "4";
yield "5";
yield "6";
}
function* customGenerator() {
yield 1;
yield 2;
yield 3;
}
let getIterator = customGenerator();
let firstValue = getIterator.next();