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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:31:54+00:00 2026-05-28T02:31:54+00:00

The term anonymous object could be a confusing term so allow me to clarify:

  • 0

The term anonymous object could be a confusing term so allow me to clarify: by anonymous object I mean the declaration of an object in the same way you would define an anon function.

example:

someFunction=function(){}
someObject={}

but more specifically anonymous in the way that they can be placed anywhere a variable of such an object or function could be placed. Best (and directly relevant) example being Object.create, now like one would use window.setTimeout(function(){},ms) (that own function’s querks aside) whereas you would just place a function in a variable’s stead, I want to be able to do this: object.Create(some__proto__object,{cake:false}) which is all fine and dandy until I attempt to include methods. Then it throws TypeError: descriptor must be object.

So I do some testing in console, I put in {} all good, {cake:"cheesecake",taste:"delicious"} ok,

variable={
   cake:"cheesecake",
   taste:"celicious",
   stateTheCatch:function(){console.log('The cake is a pie!')}
}

it works, but

//In practical use: 
//Object.create(inheritanceObject,
{
  cake:"cheesecake",
  taste:"celicious",
  stateTheCatch:function(){console.log('The cake is a pie!')}
}//);

is broken, and not counted as an object. Why is this bad? Because you type it like that in the second argument for Object.create besides using an identifier. So and clues why it doesn’t work like that?

  • 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-05-28T02:31:55+00:00Added an answer on May 28, 2026 at 2:31 am

    That’s because you are not creating an object at all. When used as a statement, the brackets create a code block, not an object literal.

    You can put brackets around any code, but it doesn’t do much. (Variables have function scope, so it doesn’t even scope variables.)

    {
      {
        var x = 41;
        {
          {
            x++;
          }
        }
      }
      alert (x);
    }
    

    If you use the object as a value, it works:

    function x(y) { y.tateTheCatch(); }
    
    x({
      cake:"cheesecake",
      taste:"celicious",
      tateTheCatch:function(){console.log('The cake is a pie!')}
    });
    

    In Javascript functions are objects, so you can use a function value anywhere you use another value. It can be sent as parameters, and be stored in variables, object properties and arrays.

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

Sidebar

Related Questions

The term test case used a lot, but what does it actually mean? Test
What's the term for this design? object.method1().method2().method3() ..when all methods return *this? I found
The term "ad hoc" is used in programming. What exactly does it mean?
I have this: $(#term).autocomplete({ minLength: 2, source: function( request, response ) { $.ajax({ url:
The term porcelain appears occasionally in the Git documentation. What does it mean?
Taxonomy term path: http://api.drupal.org/api/function/taxonomy_term_path Returns the unaliased path. I used pathauto to give the
The term REALM has an overloaded & confusing using in security, what is the
I have seen this term O(1) access time used to mean quickly but I
I've heard the term Tickless OS thrown around. What does it mean? Which OSes
I usually use the term entity to represent a business data object and in

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.