On Wed, 29 Dec 2010 08:25:33 +0100, Emeka emekami...@gmail.com wrote:
Is Prototype JavaScript's way of solving Expression Problem? And what is
really the difference between __proto__ and Prototype?
That depends on what you mean by Prototype.
The internal [[Prototype]] link of objects is a way
I would add:
To set the prototype of an object, you modify the 'prototype' property
of its constructor function. To get access to the prototype you can
use myFunction.prototype or myInstance.__proto__.
//Constructor function
var myFunction = function() { /*...*/ }
myFunction.prototype.myProperty
On Wed, Dec 29, 2010 at 8:25 AM, Emeka emekami...@gmail.com wrote:
Is Prototype JavaScript's way of solving Expression Problem? And what is
really the difference between __proto__ and Prototype?
Heh, I can't really find my own explanation in the archives, but it's
interesting where a google
Hi Emeka,
'prototype' is an attribute that all functions get (by default it's
value is set to Object prototype) The confusing thing is that this
value has nothing to do with the prototype of that function - instead
it is the value that will be assigned to as the prototype of any
instance created
On 12/29/10, Ben Alman cow...@rj3.net wrote:
I just posted this article, in case anyone's interested in reading
about some wacky behavior in IE6-8 with try...catch.
http://weblog.bocoup.com/the-catch-with-try-catch
It’s like a whole new kind of hoisting, made extra-special just for
Internet
On Dec 29, 1:25 am, Emeka emekami...@gmail.com wrote:
[...]
Is Prototype JavaScript's way of solving Expression Problem? [...]
The short answer is that Brendan Eich probably wasn't thinking about
it when he built the language in the 9 days he had available. The
longer answer is that yes it is
'__proto__' on the other hand represents the actual prototype of an
instance. It's a non-standard approach and is only supported on some
browsers. The ES5 standard approach for retrieving an object's
prototype is Object.getPrototypeOf(obj) but this is not supported in
IE9
I would clarify