Skip to content

Commit 979c3c9

Browse files
Added Callback.js
1 parent e8d310b commit 979c3c9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Callback.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function greet(name) {
2+
console.log(name);
3+
}
4+
5+
function passGreet(name, callback) {
6+
const myGreet = `Hello ${name}`;
7+
callback(myGreet);
8+
}
9+
10+
passGreet("John",greet);

0 commit comments

Comments
 (0)