2020 March 2 essays

At the same 1.apply () call () bind () and differences

At the same: this is the point of modification;

Differences: apply () is used when the function is called with two parameters; a first modification is this; the second parameter is an array thereof.

    A plurality of parameters;; Call () is used when calling the function is to modify this first point; second incoming start parameter.

    bind () function is defined in the time, there is a parameter, to modify this point.

2.this four binding way

  Direct binding manner lowest priority (default)

    Did not take long to call the previous function is directly binding way

  Implicit binding way higher priority than the direct binding of some

    Call the function with. The binding is implicit way

 3. Show Binding

    apply()

    call()

    bind()

4.new binding way

Guess you like

Origin www.cnblogs.com/xwzs/p/12404455.html