MSDotNetBuddy
The blog is to experiment with various technologies.
Search This Blog
2023/07/25
Closure triple multiplication
function
mul
(
x
){
return
function
(
y
){
return
function
(
z
){
return
x
*
y
*
z
;
}
}
}
var
res
=
mul
(
2
)(
3
)(
4
)
console
.
log
(
res
)
output:
24
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment