-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
58 lines (55 loc) · 1.72 KB
/
script.js
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
// const ele=document.getElementById("id1")
// ele.innerText ="ABC"
// document.body.append(ele)
//callback hell task
// setTimeout(() => {
// console.log("5");
// setTimeout(() => {
// console.log("4");
// setTimeout(() => {
// console.log("3");
// setTimeout(() => {
// console.log("2");
// setTimeout(() => {
// console.log("1");
// setTimeout(()=>{console.log("Happy Independance Day");
// },1000)
// }, 1000);
// }, 1000);
// }, 1000);
// }, 1000);
// }, 1000);
//Callback Hell Task:
setTimeout(() => {
document.getElementById("id1").innerText="10"
setTimeout(() => {
document.getElementById("id1").innerText="9"
setTimeout(() => {
document.getElementById("id1").innerText="8"
setTimeout(() => {
document.getElementById("id1").innerText="7"
setTimeout(() => {
document.getElementById("id1").innerText="6"
setTimeout(() => {
document.getElementById("id1").innerText="5"
setTimeout(() => {
document.getElementById("id1").innerText="4"
setTimeout(() => {
document.getElementById("id1").innerText="3"
setTimeout(() => {
document.getElementById("id1").innerText="2"
setTimeout(() => {
document.getElementById("id1").innerText="1"
setTimeout(() => {
document.getElementById("id1").innerText="Happy Independence Day!!!"
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);
}, 1000);