Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.chainon-marquant.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <2299122.SKD2KPVSPY@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Tue, 13 Dec 2011 03:42:53 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: toString Method with Parameters Newsgroups: comp.lang.javascript References: <4g1de7t607d0sdudjmdv4mr1o4cm5hvekg@4ax.com> <1663760.JFYEL58v44@PointedEars.de> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 22 NNTP-Posting-Date: 13 Dec 2011 03:42:53 CET NNTP-Posting-Host: 837c0f4b.newsspool3.arcor-online.net X-Trace: DXC=W?;_c:]FG1Ok:C4l9A;OcOMcF=Q^Z^V3H4Fo<]lROoRA8kF Use this: > > NewDate.prototype.toString = function (Selector) { > // … > }; This is better as it avoids confusion between constructor name and name of argument: NewDate.prototype.toString = function (selector) { // … }; PointedEars -- > If you get a bunch of authors […] that state the same "best practices" > in any programming language, then you can bet who is wrong or right... Not with javascript. Nonsense propagates like wildfire in this field. -- Richard Cornford, comp.lang.javascript, 2011-11-14