Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a3b6b7d

Browse files
learn asynch
1 parent ba4cb25 commit a3b6b7d

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

‎practise.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
2+
// callback function
33
function sayHello(){
44
console.log("Hello");
55
}
@@ -18,4 +18,21 @@ let a = 10;
1818
let b = 29;
1919

2020
add(a , b , sayHello);
21-
add(a , b , sayHi);
21+
add(a , b , sayHi);
22+
23+
24+
add(23 , 12 , function(){
25+
console.log("bye....");
26+
})
27+
28+
29+
30+
31+
// asynchronous javascript
32+
33+
setTimeout(myfunction , 3000);
34+
35+
function myfunction(){
36+
console.log('hi..');
37+
}
38+

‎tempCodeRunnerFile.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
for(key in person){
2-
// console.log(key[person]);
3-
// }
1+
setTimeout(myfunction , 3000);
2+
3+
function myfunction(){
4+
console.log('hi..');
5+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /