-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlec18.html
More file actions
74 lines (62 loc) · 1.61 KB
/
lec18.html
File metadata and controls
74 lines (62 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
// function step1(fn){
// setTimeout(()=>{
// console.log("select");
// fn()
// },5000)
// }
// function step2(fn){
// setTimeout(()=>{
// console.log("filter");
// fn()
// },4000)
// }
// function step3(fn){
// setTimeout(()=>{
// console.log("caption");
// fn()
// },3000)
// }
// function step4(){
// setTimeout(()=>{
// console.log("post");
// },2000)
// }
// step1(()=>{
// step2(()=>{
// step3(()=>{
// step4()
// })
// })
// })
// let promise= new Promise((res,rej)=>{
// //res()
// rej()
// })
// console.log(promise);
let promise= new Promise((res,rej)=>{
//res()
// res("hello")
let isBool=true
if(isBool){
console.log("true");
} else{
console.log("bye");
}
})
promise.then((r)=>{
console.log(r);
}).catch((err)=>{
console.log(err);
})
</script>
</body>
</html>