同问
开发者问题收集
为什么迭代器对象变量未定义?
学习在 Javascript 中使对象可迭代。对象是:var arrayLikeObject = {0: "hello",1: "there",2: "crappy coder",length: 3,}然后我这样做使其可迭代:arrayLikeObject[Symbol.iterator] = function(){return {current: 0, // <---- but... it IS
javascript
iterable
2020-10-20
«
1
»