 |
|
 |
| |
Developer on focus
Anton Zamov is a dipl. engineer with more than 6 years of active professional
experience and many awards ...
read more>>
|
|
 |
 |
 |
|
 |
|
 |
| |
|
Is it possible to nest functions in JavaScript?
|
Yes, it is. Be aware that in this case that the nested
function is private to its containing function and the nested
function can be accessed only with statements in the containing
function. You could specify arguments for both the nested and
the containing functions.
You may take a look of the following example:
function container(x)
{
function add(y)
{
return x+y
}
return add
}
result=container(10)(5) // will return 15
|
About the author of this programming example or tutorial:
Anton Zamov is a software engineer with more than6 years
of active experience in web and software development and design.
Anton Zamov has extensive experience and broad knowledgebase
in C# and JAVA programming and has created a lot of
running e-commerce systems, portals and content management
systems using PHP and other web development technologies.
For more information about Anton Zamov, you may visit the personal web site of
Anton Zamov.
|
|
|
 |
 |
 |
|
|