Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <9918278.jPXTlJuZSa@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Tue, 18 Sep 2012 11:14:26 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <2rle589b4vsrkfkdahh9f78t8vrkg69t3n@4ax.com> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 29 NNTP-Posting-Date: 18 Sep 2012 11:14:26 CEST NNTP-Posting-Host: dd2c8530.newsspool1.arcor-online.net X-Trace: DXC=:1OObiZZ9G\mG86`U=_nC_ic==]BZ:af^4Fo<]lROoRQnkgeX?EC@@PKV1GJ:PY58QDZm8W4\YJN\R=i2=[N6Y6ZPb On 2012-09-17 22:56, Gene Wirchenko wrote: >> Christoph Becker wrote: >>> function Counter() { >>> var theValue = 0; >>> return { >>> getVal: function() { >> ^^^^^^^^^^^^^^^^^^ >> Could you please give me pointer to where this syntax is >> discussed? I tried the standard, but what I found -- sections 12.1 >> Block and 12.12 Labelled Statements -- is remarkably opaque. Do I >> even have the correct section(s)? > > No, this has nothing to do with labels. The return value in this case is a reference to > an object, written in the form of an object literal. [further explanation] ACK. PointedEars -- Prototype.js was written by people who don't know javascript for people who don't know javascript. People who don't know javascript are not the best source of advice on designing systems that use javascript. -- Richard Cornford, cljs,