回答編集履歴
1
調整
test
CHANGED
@@ -2,9 +2,10 @@
|
|
2
2
|
```javascript
|
3
3
|
<script>
|
4
4
|
window.addEventListener('DOMContentLoaded', ()=>{
|
5
|
-
const
|
5
|
+
const start=500;
|
6
|
+
const repeat=100;
|
6
|
-
const
|
7
|
+
const interval=3;
|
7
|
-
const a=Array(
|
8
|
+
const a=Array(repeat).fill(null).map((_,x)=>start-x*interval);
|
8
9
|
output.textContent=a.join(" ");
|
9
10
|
const b=a.reduce((x,y)=>x+y);
|
10
11
|
output.textContent+=` sum=${b}`;
|
@@ -12,3 +13,4 @@
|
|
12
13
|
</script>
|
13
14
|
<div id="output"></div>
|
14
15
|
```
|
16
|
+
※微調整
|