// function * a(){
// yield "1"
// yield "2"
// yield "3"
// }
// var [aa,bb,cc] = a();
// console.log(...a());
// console.log(Array.from(a()));
// for(let item of a()){
// console.log(item)
// }
function
*
a(){
var
val =
yield
"asurson";
yield
fetch(
`https://api.github.com/users/
${
val
}
`);
}
var
b =
a();
var
name =
b.
next().
value;
b.
next(
name).
value.
then(
resolve
=>{
return
resolve.
json();
}).
then((
data)
=>{
console.
log(
data);
})
// async function fn(){
// await 123;
// }
// console.log(1);
async
function
fun(){
return
1;
}
fun().
then(
resolve
=>{
console.
log(
resolve);
}).
catch(
err
=>{
console.
log(
err);
})
console.
log(
222);