JavaScript Hardening tutorial--function Parameters

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.