201506230818_ JavaScript authoritative Guide (sixth edition)--callee and Caller, object properties used as arguments, Custom function properties (p175-180)

Source: Internet
Author: User

1. callee the function being executed. How to use: Arguments.callee ...

Caller is calling the function that executes the function.

2. Object properties are used as arguments, such as: function fn (ARG) {

var arg.name = name | | ' Josn ',

Arg.age = Age | | 60,

...

}

3. when passing in the argument, it would be better to check the value type times wrong and not to error at execution time;

4. if (element = = null) continue; filter null or undefined elements;

5. Isfinite (); Check if the number is infinite;

6. var arr = [function (x) {return x*x;},30]; var val = arr[0] (arr[1]); Console.log (Val); the

7. Custom Function Properties.

A. A limited number of positive integers. if (Isfinite () && n >0 && n = = Math.Round (n)) {//...}// limited positive integer

B. The cached function evaluates to a value that puts it into one of the properties of the function. form: fn.name = ' josn ';

8.

201506230818_ JavaScript authoritative Guide (sixth edition)--callee and Caller, object properties used as arguments, Custom function properties (p175-180)

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.