[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-07-03 Thread Yanick
If germany has that many fans... I do not wish to hear that number in Deutsch! :P On Jul 2, 2:03 am, "Ryan Gahl" <[EMAIL PROTECTED]> wrote: > See... confusing eh? > > :) > > but, perhaps funkyTown sets davidHasselhoff to {USA: {fans: [4]}, Germany: > {fans: [9993]}} > > > > On We

[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-07-01 Thread Gareth Evans
Well I suppose davidHasselhoff could be a global [phenomenon] On Wed, Jul 2, 2008 at 6:03 PM, Ryan Gahl <[EMAIL PROTECTED]> wrote: > See... confusing eh? > > :) > > but, perhaps funkyTown sets davidHasselhoff to {USA: {fans: [4]}, Germany: > {fans: [9993]}} > > > > > On Wed, Jul 2

[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-07-01 Thread Ryan Gahl
See... confusing eh? :) but, perhaps funkyTown sets davidHasselhoff to {USA: {fans: [4]}, Germany: {fans: [9993]}} On Wed, Jul 2, 2008 at 12:58 AM, Gareth Evans <[EMAIL PROTECTED]> wrote: > I think you'll find that method has a fatal flaw, > You'll lock the browser up because

[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-07-01 Thread Gareth Evans
I think you'll find that method has a fatal flaw, You'll lock the browser up because davidHasselhoff is always false. Gareth On Wed, Jul 2, 2008 at 5:43 PM, Ryan Gahl <[EMAIL PROTECTED]> wrote: > No, Jerod... this is the most confusing way ever (note: theMeaningOfLife is > declared elsewhere): >

[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-07-01 Thread Ryan Gahl
No, Jerod... this is the most confusing way ever (note: theMeaningOfLife is declared elsewhere): var array = new Array(); function adamSandler(georgeCostanza) { var whatTheF = 42; array[-whatTheF + theMeaningOfLife] = georgeCostanza; } var ryanSeacrest = isTodayTuesday() ? 41234522 : 0; while (!da

[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-07-01 Thread Jerod Venema
That has to be the most confusing way to fill an array EVER. On Sun, Jun 8, 2008 at 8:17 PM, tancurrom <[EMAIL PROTECTED]> wrote: > > It's interesting to note that in JavaScript version 1.7, array > comprehensions allows you do achieve this kind of 'filling' of your > arrays. > > E.g. > > functio

[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-06-08 Thread tancurrom
It's interesting to note that in JavaScript version 1.7, array comprehensions allows you do achieve this kind of 'filling' of your arrays. E.g. function range(begin, end) { for (let i = begin; i < end; ++i) { yield i; } }; var n = [0 for each (i in range(0,20))] // [0,0,0,0,0,0,0,0,0,0,

[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-06-07 Thread Jay Tee
On Jun 3, 10:06 am, Yanick <[EMAIL PROTECTED]> wrote: > > Hope this helps. (And if the core folks think this is core worthy, I > think it could make a pretty addon.) > > yanick You've helped very much! This particular function has helped me with populating grids more than anything else. It's s

[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-06-03 Thread Yanick
On 27 mai, 12:22, Jay Tee <[EMAIL PROTECTED]> wrote: > On May 26, 8:29 pm, kangax <[EMAIL PROTECTED]> wrote: > > > > > On May 26, 12:56 pm, Jay Tee <[EMAIL PROTECTED]> wrote: > > > > function array_fill(len,val) { > > >   return (function() { > > >     var retarray = []; > > >     $R(0,len,true).e