Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <3132599.tVyl27kpNs@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Thu, 07 Feb 2013 00:27:51 +0100 User-Agent: KNode/4.8.5 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+&. MIME-Version: 1.0 Lines: 47 NNTP-Posting-Date: 07 Feb 2013 00:27:52 CET NNTP-Posting-Host: abf581f1.newsspool3.arcor-online.net X-Trace: DXC=MMcF=Q^Z^V384Fo<]lROoR18kF2I7K8f5;7E5: X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:18370 JRough wrote: > That makes sense, it only needs to be one "I" at a time, it will be the > current context whether, benefits or products loop. Is there a way to > wrap the i up in the return line so I can grab the count? > > Handlebars.registerHelper('each', function(context, options) { > var ret = ""; > > for(var i=0, j=context.length; i ret = ret + options.fn(context[i]); > > } > > return {ret, i}; > }); > var h What can I reply to this? If I tell you despite this being off-topic here, the answer might be wrong because I do not care to learn the obscure non-ECMAScript language that you are using. Then again, my answer might be right, whereas you will not have learned anything from the experience. So you would continue to post such unreadable off-topic articles via Google Groups. But if I choose to save my free time for more interesting questions, and do not tell you anything, you may never know what went wrong here. So I just reply to you: Mu. *Think* about what I posted and what you neglected to quote. Then, hopefully, you will be able to answer the question that you should have asked instead, by yourself. Even if you will not be able to answer the real question for yourself, you will know the real question by then, which is a first step in the right direction. And (this is for all whom it may concern) *please* read one of the following carefully before you post to Usenet (again): pp. pp. HTH -- PointedEars