We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e890ec commit 8af893dCopy full SHA for 8af893d
assignments/closure.js
@@ -5,6 +5,16 @@
5
// The outer scope can be a parent function, or the top level of the script.
6
7
8
+function favouriteClub(clubName){
9
+ var club = "My favourite club is " + clubName;
10
+ var sayClub = function(){
11
+ console.log(club);
12
+ }
13
+ return sayClub;
14
+}
15
+var myClub = favouriteClub("Chelsea");
16
+myClub();
17
+
18
/* STRETCH PROBLEMS, Do not attempt until you have completed all previous tasks for today's project files */
19
20
0 commit comments