Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #18370

Re: handlebars javascript error on return in function, i is not defined

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> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <usenet@PointedEars.de>
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+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
Subject Re: handlebars javascript error on return in function, i is not defined
Newsgroups comp.lang.javascript
References <ab80af3d-ae71-455f-a5de-e9e67a0ba2f9@googlegroups.com> <a737d8d1-a76a-47ff-a797-2a8b66cc7a76@googlegroups.com>
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=M<B;@VTgOF;^8FBo0_81f>McF=Q^Z^V384Fo<]lROoR18kF<OcfhCO;o;k`8g]<bO7DZm8W4\YJN<b@mF9jNikd5e8nA28^e?>2I7K8f5;7E5:
X-Complaints-To usenet-abuse@arcor.de
Xref csiph.com comp.lang.javascript:18370

Show key headers only | View raw


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<j; 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):

<http://jibbering.com/faq/> pp.
<http://PointedEars.de/faq> pp.


HTH
-- 
PointedEars

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

handlebars javascript error on return in function, i is not defined jr <jlrough@yahoo.com> - 2013-02-05 15:05 -0800
  Re: handlebars javascript error on return in function, i is not defined Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-06 04:15 +0100
  Re: handlebars javascript error on return in function, i is not defined JRough <janis.rough@gmail.com> - 2013-02-06 10:24 -0800
    Re: handlebars javascript error on return in function, i is not defined Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-07 00:27 +0100

csiph-web