function within function javascript
Functions are one of the fundamental building blocks in JavaScript. A function is a JavaScript procedureâa set of statements that performs a task or calculates a value. To use a function, you must define it somewhere in the scope from which you wish to call it. See also the exhaustive reference chapter about JavaScript functions to get to know the details.