为了账号安全,请及时绑定邮箱和手机立即绑定

Make An Iterable Object

Make An Iterable Object

繁花不似锦 2018-12-27 22:19:01
/* * Programming Quiz: Make An Iterable Object * * Turn the `james` object into an iterable object. * * Each call to iterator.next should log out an object with the following info: *     - key: the key from the `james` object *     - value: the value of the key from the `james` object *     - done: true or false if there are more keys/values * * For clarification, look at the example console.logs at the bottom of the code. */const james = {    name: 'James',    height: `5'10"`,    weight: 185};let iterator = james[Symbol.iterator]();console.log(iterator.next().value); // 'James'console.log(iterator.next().value); // `5'10`console.log(iterator.next().value); // 185这一题怎么写呀?相关知识链接:https://segmentfault.com/a/11...我看了网上的资料,试了好几遍都不对,求大佬们帮忙解决?
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 546 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信