The tawny owl or brown owl (Strix aluco) is a stocky, medium-sized owl commonly found in woodlands across much of Eurasia. Its underparts are pale with dark streaks, and the upperparts are either brown or grey. Several of the eleven recognised subspecies have both variants.
At the most basic level, a function definition (i.e., the code that defines the function) requires the function keyword, the function's name, and a script block, as the following syntax shows: The script block, which needs to be enclosed in braces, contains the statements that run when you call the function.
As we'll discuss later in the next chapter, function literals (another feature introduced in JavaScript 1.2) may appear within any JavaScript expression, which means that they can appear within if and other statements. Example. Try the following example to learn how to implement nested functions.