for statement with index and value
Tingan Ho
tingan87 at gmail.com
Tue Jul 14 15:01:56 UTC 2015
>This is pretty ingenious. If I thought this was a real problem that needed
solving
I'm not sure how I should interpret this. But I'm pretty sure you also need
the current index of array in a for loop.
Since I can access the index and value directly in `.forEach(value, index,
array)`, why isn't there a for-loop-statement/control-flow-statement for
doing the same thing?
And yes I heard it can be solved with different methods. We can go on
discuss different way to loop through an array, recursive functions,
while-loops, iterators, generators, meta syntax etc. But they aren't clean
solutions to a wildly popular problem.
All these counter arguments. Can you explain why even `.forEach(value,
index, array)` made the deal also?
tis 14 juli 2015 kl 21:41 skrev Jonathan Bond-Caron <jbondc at gdesolutions.com
>:
> On Tue Jul 14 09:27 AM, Domenic Denicola wrote:
> > From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of
> > Matthew
> > Robb
> >
> > > Why not use the new meta syntax?
> >
> > If I thought this was a real problem that
> > needed solving,
>
> Disagree
>
> "As early as the mid-1980’s, it was observed that programming
> language research and funding emphasized technical aspects of the
> domain and neglected psychological aspects:"
>
> " The human and computer parts of programming languages have developed in
> radical asymmetry"
>
> http://repository.cmu.edu/cgi/viewcontent.cgi?article=1805&context=isr
>
> Bias of Engineering problems > Psychology
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150714/41ff357c/attachment.html>
More information about the es-discuss
mailing list