Skip to content

Commit 8929bc1

Browse files
committed
we can also write it in this way also both mean the same thing
1 parent 487fb60 commit 8929bc1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

closure.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
function x(){
22
var a = 10;
3-
function y(){
3+
return function y(){
44
console.log(a);
55
}
6-
return y;
7-
86
}
9-
var z = x();
7+
// after multiple line of code
8+
9+
var z = x();
10+
z();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy