This article ish5eduAgency officialHTML5 Trainingtutorial, main introduction: javascript intensive tutorial--function parameters
The JavaScript function parameter JavaScript function does not perform any checks on the value of the parameter (arguments). function explicit parameters and hidden parameters (arguments) in the previous tutorial, we have learned the explicit parameters of the function: functionname (parameter1, parameter2, parameter3) {code to be executed} The function explicit parameters are listed when the function is Defined. The Function-hidden parameter (arguments) is passed to the Function's true value when the function is Called. Parameter rule the JavaScript function is defined when the parameter does not specify a data type. The JavaScript function does not detect hidden parameters (arguments). The JavaScript function does not detect the number of hidden parameters (arguments). Default parameter if the function is missing a parameter when it is called, the parameter is set by default to: undefined sometimes this is acceptable, but it is recommended that you set a default value for the Parameter: instance function myFunction (x, y) {if (y = = = Undefined) { y = 0; } }
Click to enter JavaScript intensive tutorial
This article is from the "11721999" blog, please be sure to keep this source http://11731999.blog.51cto.com/11721999/1850606
JavaScript Hardening tutorial--function Parameters