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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:49:00+00:00 2026-06-18T03:49:00+00:00

In the book JavaScript: The Definitive Guide, 6th edition, on page 61, section 4.5

  • 0

In the book “JavaScript: The Definitive Guide, 6th edition”, on page 61, section 4.5 Invocation Expressions, it says –

In method invocations, the object or array that is the subject of
the property access becomes the value of the this parameter while
the function is being executed.

Can someone, in plain english, explain the meaning of that statement, and maybe give an example?
I especially don’t know what is meant by the “subject of the property access” means.

Thanks very much!

  • 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-18T03:49:02+00:00Added an answer on June 18, 2026 at 3:49 am

    My understanding of ‘this’ is that ‘this’ is the context of the function during its execution.
    Unless you explicitely change ‘this’, the default behaviour is that the context of the function during its execution is the context of the function call.

    First case (most simple) :

    var writeHelloFromThis = function() {
           console.log('hello from ' + this);
     };
    
    writeHelloFromThis();
    

    –> the output is “hello from [object Window]”, since the context of the call was the global object i.e. Window.

    Second case : now we define an object, and add the writeHelloFromThis to it :

    var anObject={};
    
    anObject.writeHelloFromThis = writeHelloFromThis;
    

    and now we call writeHelloFromThis with anObject as context :

    anObject.writeHelloFromThis();
    

    –> the output is “hello from [object Object]” : this was the function call’s context : anObject in this case.

    3rd case, a little bit trickier : now we will store the writeHelloFromThis of ‘anObject’ into another var :

    var anObjectsWriteHelloFromThis = anObject.writeHelloFromThis;
    

    anObjectsWriteHelloFromThis just stores a function (=a reference) without knowing anything about ‘anObject’. So if we call :

     anObjectsWriteHelloFromThis();
    

    the output will be “hello from [object Window]”, since the context of the call was the global object i.e. Window.

    Last remark : if this way of proceeding seems limitative to you, you’re right : that’s why some Function methods : bind, call, apply, allows you to change the context of the function.

    so one last example :

     writeHelloFromThis.call(anObject);
    

    will have the output “hello from [object Object]”, and not windows, since here we force ‘this’ to be anObject.

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

Sidebar

Related Questions

In book JavaScript: The Definitive Guide, 5th Edition by David Flanagan, says: before sending
In the book JavaScript the definitive guide 5 edition , section 9.2 Prototypes and
Question from Object-Oriented JavaScript book: Imagine Array() doesn't exist and the array literal notation
I am reading Javascript The Definitive Guide. In this book, Events and Event handling,
Today is my first day in JavaScript. The book (JavaScript Definitive Guide) has an
I wonder why even in the Javascript Definitive Guide 6th ed, O'Reilly, p. 149
I am doing some exercises in my object-oriented javascript book, I notice that this:
The book I am reading says that after allocating an object I need to
The book Professional Javascript by Zakas says that 1) IE uses event bubbling 2)
I've been reading this book Javascript Enlightenment by Cody Lindley. On page 82 he

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.