Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #17952
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!zen.net.uk!dedekind.zen.co.uk!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | GGolf <invalid@invalid.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Does copying the prototype reference from another constructor function maintain the prototype chain? |
| Date | Sat, 05 Jan 2013 12:39:34 +0530 |
| Organization | Aioe.org NNTP Server |
| Lines | 17 |
| Message-ID | <kc8jjg$k07$1@speranza.aioe.org> (permalink) |
| NNTP-Posting-Host | mfqfAlwqlLFXBXCKA5f0sg.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com comp.lang.javascript:17952 |
Show key headers only | View raw
I've been a Javascript dabbler for a few years, and have just embarked on learning more advanced stuff. I have the following question in a tutorial by John Resig: At http://ejohn.org/apps/learn/#76, Resig mentions that only the following maintains the prototype chain: Ninja.prototype = new Person(); However, I notice that even the following statement makes all the test statements pass: Ninja.prototype = Person.prototype; Does it mean that using "Person.prototype" can actually be used instead of "new Person()"?
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Does copying the prototype reference from another constructor function maintain the prototype chain? GGolf <invalid@invalid.com> - 2013-01-05 12:39 +0530
Re: Does copying the prototype reference from another constructor function maintain the prototype chain? JJ <jaejunks@nah.meh> - 2013-01-05 10:57 +0000
Re: Does copying the prototype reference from another constructor function maintain the prototype chain? David Mark <dmark.cinsoft@gmail.com> - 2013-01-05 06:44 -0800
Re: Does copying the prototype reference from another constructor function maintain the prototype chain? David Mark <dmark.cinsoft@gmail.com> - 2013-01-05 06:43 -0800
Re: Does copying the prototype reference from another constructor function maintain the prototype chain? John G Harris <john@nospam.demon.co.uk> - 2013-01-05 15:53 +0000
Re: Does copying the prototype reference from another constructor function maintain the prototype chain? David Mark <dmark.cinsoft@gmail.com> - 2013-01-05 08:51 -0800
Re: Does copying the prototype reference from another constructor function maintain the prototype chain? Scott Sauyet <scott.sauyet@gmail.com> - 2013-01-05 12:25 -0800
Re: Does copying the prototype reference from another constructor function maintain the prototype chain? Luc Yen <luc@goal.tw> - 2013-01-05 13:23 -0800
csiph-web