Skip to content

Commit 3fde168

Browse files
committed
Merge branch 'master' of https://github.com/ne2030/studyExample
2 parents 22b7724 + 830c6d7 commit 3fde168

19 files changed

+45
-4
lines changed
-172 Bytes
Binary file not shown.
-178 Bytes
Binary file not shown.
-168 Bytes
Binary file not shown.

Javascript/generator.js

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,48 @@ const take = iterable => (n) => {
2121

2222
// console.log(take(infinite)(1000));
2323

24-
console.log(take([1, 2, 3, 4, 5, 6])(3));
24+
// console.log(take([1, 2, 3, 4, 5, 6])(3));
25+
26+
// generator 의 return ?
27+
{
28+
const gen = function* () {
29+
return [1, 2, 3];
30+
}
31+
32+
const iter = gen();
33+
34+
// console.log('iter', iter);
35+
// console.log('iter', iter.next());
36+
37+
// for (const x of {}) {
38+
39+
// }
40+
}
41+
42+
43+
// generator yield*
44+
45+
{
46+
const gen1 = function* () {
47+
yield [1, 2, 3, 4, 5];
48+
}
49+
50+
const gen2 = function* () {
51+
yield* [1, 2, 3, 4, 5];
52+
}
53+
54+
const iter1 = gen1();
55+
const iter2 = gen2();
56+
57+
console.log(iter1.next())
58+
console.log(iter1.next())
59+
console.log(iter1.next())
60+
console.log(iter1.next())
61+
console.log(iter1.next())
62+
63+
console.log(iter2.next())
64+
console.log(iter2.next())
65+
console.log(iter2.next())
66+
console.log(iter2.next())
67+
console.log(iter2.next())
68+
}

react_async/.README.md.icloud

-156 Bytes
Binary file not shown.

react_async/.index.html.icloud

-158 Bytes
Binary file not shown.

react_async/.package.json.icloud

-160 Bytes
Binary file not shown.

test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
number = 10 / 3
2-
3-
print('당신의 몸무게는 %0.2f' % number)

testingEnv/.package.json.icloud

-160 Bytes
Binary file not shown.

views/.ajax.html.icloud

-157 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)