-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
32 lines (25 loc) · 835 Bytes
/
index.js
File metadata and controls
32 lines (25 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// const name = {
// first: 'kung bum',
// last: 'kim'
// }
// const hello = ['kung bum', 'kim'];
// console.log(Symbol.iterator in name);
// console.log(Symbol.iterator in hello);
// const iterable = {
// // 이터레이터를 키로 갖게 한다.
// [Symbol.iterator]() {
// let i = 3;
// return {
// next() {
// return i === 0 ? {done: true}: { value: i--, done: false };
// }
// }
// }
// }
// let iterator = iterable[Symbol.iterator]();
// console.log(iterator.next()); // { value: 3, done: false }
// console.log(iterator.next()); // { value: 2, done: false }
// console.log(iterator.next()); // { value: 1, done: false }
// console.log(iterator.next()); // { done: true }
// for (const a of iterable) console.log(a);
console.log(typeof null)