摘要: // 类似于将foo()中yield 3; yield 4; 添加到bar() // 只输出调用的函数下的return值 function* foo() { yield 3; yield 4; return "pubg";//在bar()的调用下,不会输出此值 } function* bar() { 阅读全文
posted @ 2021-10-25 19:21 yongerbingxuan 阅读(27) 评论(0) 推荐(0)
摘要: let obj = { time: "8.8", doing: "listen to music", who: "sbluo", length: 3, [Symbol.iterator]() { let _this = this; let index = 0; let arr = []; for ( 阅读全文
posted @ 2021-10-25 19:03 yongerbingxuan 阅读(41) 评论(0) 推荐(0)