Never thought assigning a new object as prototype was taking that away... But then when you use for in loops, it is shown whereas it shouldn't...
On Sat, Aug 20, 2011 at 8:10 PM, Dmitry A. Soshnikov <[email protected]> wrote: > On 20.08.2011 7:42, Xavier MONTILLET wrote: >> >> What's the aim of line 69? >> >> https://github.com/DmitrySoshnikov/Essentials-of-interpretation/blob/master/src/lesson-2.js >> > > To restore `constructor` property since we override it when assign to > `prototype`. > > var F = function() {}; > var f = new F; > > console.log(f.constructor == F); // true > > // but then > F.prototype = {x: 10}; > > console.log(f.constructor == F); // false > > Details: > http://dmitrysoshnikov.com/ecmascript/chapter-7-2-oop-ecmascript-implementation/ > > Dmitry. > >> On Thu, Aug 11, 2011 at 1:46 PM, Dmitry A. Soshnikov >> <[email protected]> wrote: >>> >>> Then next step in implementing a small language: >>> >>> "Essentials of interpretation" Lesson 2. Parsing. Lexer of AE in math >>> infix >>> notation. >>> >>> >>> https://github.com/DmitrySoshnikov/Essentials-of-interpretation/blob/master/src/lesson-2.js >>> >>> Dmitry. >>> >>> -- >>> To view archived discussions from the original JSMentors Mailman list: >>> http://www.mail-archive.com/[email protected]/ >>> >>> To search via a non-Google archive, visit here: >>> http://www.mail-archive.com/[email protected]/ >>> >>> To unsubscribe from this group, send email to >>> [email protected] >>> > > -- > To view archived discussions from the original JSMentors Mailman list: > http://www.mail-archive.com/[email protected]/ > > To search via a non-Google archive, visit here: > http://www.mail-archive.com/[email protected]/ > > To unsubscribe from this group, send email to > [email protected] > -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
