Skip to content

Commit 1406fbf

Browse files
committed
Create proxy-object
1 parent dd0e06e commit 1406fbf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

proxy-object

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// That object acts a mediator.
2+
3+
var video = {
4+
makeRequest: function(){
5+
proxy.makeRequest();
6+
}
7+
}
8+
9+
var proxy = {
10+
makeRequest: function(){
11+
this.caheRequst = http.makeRequest();
12+
return this.caheRequest;
13+
}
14+
}
15+
16+
var http = {
17+
makeRequest: function(){
18+
return 'We have got some information using the http request'
19+
}
20+
}

0 commit comments

Comments
 (0)