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

  • Home
  • SEARCH
  • 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 8109977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:35:25+00:00 2026-06-06T01:35:25+00:00

This is pure curiosity. Let’s write an object: var display = { res1:{ w:640,

  • 0

This is pure curiosity. Let’s write an object:

 var display = { res1:{ w:640, h:480 }, res2:{ w:320, h:240 }, nores:{} };

Now from this object, we’re sending the nores property to a function. Since nores is an object, whatever we change in somefunction is going to be seen later in display.nores:

 somefunction(display.nores);

Now here’s the question. Does somefunction() has any form of access to display‘s other properties (res1 / res2) given that display is defined inside a closure and somefunction() was defined outside of that closure? I mean can it reference the whole display object just from its nores property that was passed as an argument?

  • 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-06T01:35:27+00:00Added an answer on June 6, 2026 at 1:35 am

    Does somefunction() has any form of access to display’s other properties (res1 / res2) given that display is defined inside a closure and somefunction() was defined outside of that closure?

    No

    I mean can it reference the whole display object just from its nores property that was passed as an argument?

    There is no reverse relationship between the properties of an object and their values. The only way to find them would be to have access to the object and then to loop over it until you find a match.

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

Sidebar

Related Questions

This is pure curiosity. Let's say I have a resource Users and want to
I get a longString from object's onclick value var longString = String(this.onclick); output like
This is pure curiosity... Most 'professionals' will likely never use Form1 as a valid
This is a question that arose mostly of pure curiosity (and killing some time).
I know this is a micro-optimization, so I ask out of pure curiosity. Logically,
This question is out of pure curiosity. How does Cocoa define the id type?
This question exist only because of pure curiosity. Not a homework. Find the fastest
This question is for pure curiosity. Lets say I have lighttpd installed on my
let's say I got a place_categories.xml file as following, and this is pure xml
This is not a pure programming question, however it impacts the performance of programs

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.