回答編集履歴
1
ミスがあったため修正。
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
```js
|
10
10
|
|
11
|
-
function
|
11
|
+
function test() {}
|
12
12
|
|
13
13
|
test(); // 実行
|
14
14
|
|
@@ -28,6 +28,28 @@
|
|
28
28
|
|
29
29
|
|
30
30
|
|
31
|
+
```js
|
32
|
+
|
33
|
+
function test() { console.log( 0 ) }
|
34
|
+
|
35
|
+
setTimeout( test, 1000 );
|
36
|
+
|
37
|
+
function test2() {
|
38
|
+
|
39
|
+
console.log( 1 )
|
40
|
+
|
41
|
+
return function() { console.log( 2 ) }
|
42
|
+
|
43
|
+
}
|
44
|
+
|
45
|
+
setTimeout( test2(), 1000 );
|
46
|
+
|
47
|
+
```
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
31
53
|
【WindowOrWorkerGlobalScope.setTimeout() - Web API | MDN】
|
32
54
|
|
33
55
|
[https://developer.mozilla.org/ja/docs/Web/API/WindowTimers/setTimeout](https://developer.mozilla.org/ja/docs/Web/API/WindowTimers/setTimeout)
|