Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7971889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:43:53+00:00 2026-06-04T07:43:53+00:00

Below is a ES5 shim for JS binding.I dont understand self .apply in the

  • 0

Below is a ES5 shim for JS binding.I dont understand self.apply in the bound function.
I know how to use apply method, but where is self pointing to in this case ? It it supposed to be a
function, but here self looks like an object.

if ( !Function.prototype.bind ) {

       Function.prototype.bind = function( obj ) {

        var slice = [].slice,
        args = slice.call(arguments, 1),
        self = this,

        nop = function () {},

        bound = function () {
        return self.apply( this instanceof nop ? this : ( obj || {} ), // self in this line is supposed  
        to // represent a function ?
        args.concat( slice.call(arguments) ) );
        };

        nop.prototype = self.prototype;
        bound.prototype = new nop();
        return bound;
        };
  }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:43:53+00:00Added an answer on June 4, 2026 at 7:43 am

    Have in mind that in javascript almost everything is an object.

    So you have it right there:

    self = this

    So, self is not representing anything, self is the instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Below is a Matlab function that implements the triangulation method as described in Multiple
Below I present you some code which has completely been butchered by me. $(.gig).hover(function()
Below is my function that will take a timestamp and tell you the time
Below is my validation() function which controls some messages in an alert: function validation()
Below I have a Json function and some php code which it retrieves. JavaScript
Below is the code I use in Chrome extension which gets a url from
Below is my current char* to hex string function. I wrote it as an
Below is my stored procedure. I want use stored procedure select all row of
Below are two simple Cython methods I wrote. In g_cython() method I used additional
Below is the db connection class I came out with so far, but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.