Is it impossible to declare methods in an anonymous object?
<p>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.</p>

<p>example:</p>

<pre><code>someFunction=function(){}
someObject={}
</code></pre>

<p>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 <code>Object.create</code>, now like one would use <code>window.setTimeout(function(){},ms)</code> (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: <code>object.Create(some__proto__object,{cake:false})</code> which is all fine and dandy until I attempt to include methods. Then it throws <strong>TypeError: descriptor must be object.</strong> </p>

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

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

<p>it works, but</p>

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

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