Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nested function javascript

/*
Function Syntax:
function functionName(parameter1, parameter2, ...) {
	return something;
}
*/

function globalFunction(a, b, c) {
	// `localFunction` cannot be called outside of `globalFunction`, once `globalFunction` finishes, `localFunction` ceases to exist
	function localFunction(d, e, f) {
		return [ f, e, d ];
	}
	return localFunction(a, b, c);
}
 
PREVIOUS NEXT
Tagged: #nested #function #javascript
ADD COMMENT
Topic
Name
8+7 =