Underscore Source Notes

Source: Internet
Author: User

Problem

1, (). Call (this) what does it mean?

2, _.noconflict () How to use?

3, obj through wrapper into _,wrapper object prototype has all the methods of underscore, _ more than obj These methods, this inheritance belongs to the inheritance of the constructor or the inheritance of the prototype chain?

4. What is the use of module in Nodejs? Why do you have to judge it? The underscore named variable is placed in each module of the exports, why different exports.

5, iterator how to use?

Knowledge points

1, the built-in object's prototype chain, the common method caches the local variable.

2. The method supported by the host environment, denoted by native.

3. Differentiate between Nodejs and browsers

if (typeof exports!== ' undefined ') {    //nodejs}else{    //browser}

4. Area score groups and objects

if (obj.length = = = +obj.length) {    //array}else{    //object}

5. Determine if an element is in an array

if (i in array)

6. Determine if obj has this key

if (_.has (obj, key)) {

}

Underscore Source Notes

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.