回答編集履歴

2

修正

2017/04/02 09:56

投稿

s8_chu
s8_chu

スコア14731

test CHANGED
@@ -1,4 +1,4 @@
1
- ECMAScript6でつかされた[スプレッド演算子](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Spread_operator)というものではないかと思いますが、いかがでしょうか?
1
+ ECMAScript6で追加された[スプレッド演算子](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Spread_operator)というものではないかと思いますが、いかがでしょうか?
2
2
 
3
3
  ```HTML
4
4
 

1

追記

2017/04/02 09:56

投稿

s8_chu
s8_chu

スコア14731

test CHANGED
@@ -1 +1,49 @@
1
1
  ECMAScript6でつかされた[スプレッド演算子](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Spread_operator)というものではないかと思いますが、いかがでしょうか?
2
+
3
+ ```HTML
4
+
5
+ <!DOCTYPE html>
6
+
7
+ <html lang="ja">
8
+
9
+ <head>
10
+
11
+ <meta charset="UTF-8">
12
+
13
+ <title>タイトル</title>
14
+
15
+ <style type="text/css">
16
+
17
+ * {
18
+
19
+ margin: 0;
20
+
21
+ padding: 0;
22
+
23
+ }
24
+
25
+ </style>
26
+
27
+ </head>
28
+
29
+ <body>
30
+
31
+ <script>
32
+
33
+ const foo = ["B", "C"];
34
+
35
+ const bar = ["A", ...foo, "D", "E"];
36
+
37
+ for (let i = 0; i < bar.length; i++) {
38
+
39
+ console.log(bar[i]);
40
+
41
+ }
42
+
43
+ </script>
44
+
45
+ </body>
46
+
47
+ </html>
48
+
49
+ ```