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 9150467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:36:54+00:00 2026-06-17T11:36:54+00:00

I was reading some documentation about the bind() function in javascript. One of the

  • 0

I was reading some documentation about the bind() function in javascript.

One of the examples starts off like this:

function list() {
  return Array.prototype.slice.call(arguments);
}

var list1 = list(1, 2, 3); // [1, 2, 3]

//  Create a function with a preset leading argument
var leadingZeroList = list.bind(undefined, 37);

var list2 = leadingZeroList(); // [37]

So my question is:

What exactly does it means to pass (undefined, 37) to bind() here?

  • 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-17T11:36:54+00:00Added an answer on June 17, 2026 at 11:36 am

    It means that you don’t want this to refer to anything in the resulting bound function. In other words, it assures that when you call your bound function, this will be undefined. Exactly why you’d do that of course depends on the code; lots of functions don’t use this so it’s a way of being tidy.

    Note that in non-strict mode, it may be the case that the runtime will substitute the global object (window in a browser) for undefined, but I can find no spec that stipulates that behavior. In strict mode, no such substitution is performed.

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

Sidebar

Related Questions

Running through some examples about sockets, one I've come across is this one and
When reading some documentation about assertions, I found: java -ea -dsa Enables assertions in
I'm looking for some advice on how to go about reading the online documentation
After searching online and reading the Oracle documentation for this, I need some help
I'm reading some documentation on IxSet's http://happstack.com/docs/crashcourse/AcidState.html#ixset , and I was wondering about looking
A question about updatable db views: I'm reading through some MSDN documentation on the
I'm trying to understand how ID3 tags work, so, after reading some documentation, I
After reading all sorts of Stackoverflow postings and various documentation including some on http://code.google.com/p/google-api-java-client/
Reading the Eigen library documentation, I noticed that some objects cannot be passed by
i've been reading through the linq to xml documentation in msdn and some other

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.