用户:
七式草莓查看:6 回复:10 评论:6 创建时间:2022-01-24T22:03:08
/* 代码我做了错误处理,你们别想执行!!
* 问:输出了什么(注意不止有数字,且要顺序正确)
*\
function*test(p){
console.log(p);
ccnsole.log(yield 1):
console.lcg(yield 2};
}
var a = test(3);
conscle.log(a.next(6).value];
console.log(a.next(7).value);
conscle.lcg(test(4).next(8).value);
console.log(test(5).next(9).value);
黑马程序员https://box3.codemao.cn/e/84e0931e785950c56db4?p=S2BacVVjtS4Bi6iyxm%2FUZpWdzRy2FU53XD0IhuD%2FHYA4udhDHpLwVndWVzdA%3D%3D 参加创作节的图哦急求建筑师imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E5%8A%A0%E6%B2%B9.gif"alt="emotion_编程猫_加油"
点赞0
评论
86135clcfunction*test(p){console.log(p);ccnsole.log(yield 1):console.lcg(yield 2};}var a = test(3);//第二行代码输出3conscle.log(a.next(6).value];//输出1console.log(a.next(7).value);//第三行代码输出7 这行代码输出2conscle.lcg(test(4).next(8).value);//第二行代码输出4 这行代码输出1console.log(test(5).next(9).value);//第二行代码输出5 这行代码输出1
点赞1
评论