回答編集履歴
2
chousei
test
CHANGED
@@ -17,3 +17,25 @@
|
|
17
17
|
```
|
18
18
|
|
19
19
|
微調整
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
Lhankor_Mhyさんのご指摘をうけて
|
24
|
+
|
25
|
+
```javascript
|
26
|
+
|
27
|
+
<script type="module">
|
28
|
+
|
29
|
+
let result=[];
|
30
|
+
|
31
|
+
const getCSV=()=>fetch('sample.csv').then(res=>res.text()).then(csvArray);
|
32
|
+
|
33
|
+
const csvArray=str=>str.split("\r\n").map(x=>x.split(","));
|
34
|
+
|
35
|
+
result=await getCSV();
|
36
|
+
|
37
|
+
console.log(result);
|
38
|
+
|
39
|
+
</script>
|
40
|
+
|
41
|
+
```
|
1
微調整
test
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
```javascript
|
2
2
|
|
3
|
-
const getCSV=
|
3
|
+
const getCSV=()=>fetch('sample.csv').then(res=>res.text()).then(csvArray);
|
4
4
|
|
5
|
-
const csvArray=
|
5
|
+
const csvArray=str=>str.split("\r\n").map(x=>x.split(","));
|
6
6
|
|
7
7
|
|
8
8
|
|
@@ -15,3 +15,5 @@
|
|
15
15
|
})();
|
16
16
|
|
17
17
|
```
|
18
|
+
|
19
|
+
微調整
|