Closed addyosmani closed 10 years ago
Another small one.
The same paragraph.
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#constructorpatternjavascript
Line 39 and down.
You do create
var defineProp = function ( obj, key, value) {
config.value = value;
Object.defineProperty( obj, key, config);
};
But you seem to forget define the object config.
The first issue was already corrected:
In commit : 5487247b
And the second also already corrected
In commit : dd66f3b1
Issue to Close.
From the site:
I read your book about design Patterns.
And I think I this fragment:
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#constructorpatternjavascript
Have some little error.
You write the code :
And the context imply that all these methods provide the same result.
But as the matter of fact the:
Creates object without Object in prototype chain.