Thanks, maybe I made a typo but I will look again. Problem solved.
Roelof Op maandag 2 februari 2015 22:38:57 UTC+1 schreef Thomas Shinnick: > Whenever you see something you don't recognize, that just might be part of > Javascript you didn't know about, try checking with one of the Javascript > reference sites. I'm sure there are a few opinions which is 'best', but I > just check the Mozilla site, such as searching for "mdn javascript foreach" > with Google which gets you to Array.prototype.forEach() > <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FArray%2FforEach> > But what you have cited seems to be missing a callback reference, like > > list.foreach( function(file){ > if file.ext = ext then { > console.log(item[i] > } > }); > > Can you look at that "official answer" again? > > On Monday, February 2, 2015 at 2:00:42 PM UTC-6, Roelof Wobben wrote: >> >> Hello, >> >> I doing exercises of nodeschool. >> >> I have to filter some data in a list so I did >> >> ~~~ >> >> for (var i=0, i < list.length , i++ ) { >> >> if file.ext = ext then { >> console.log(print item[i] >> } >> } >> >> but in the official solution I see this : >> >> ~~~ >> >> List.foreach { >> if file.ext = ext then { >> console.log(item[i] >> } >> } >> >> ~~~ >> >> where can I find more info on the list properties ? >> >> Roelof >> >> -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/d32d10e5-c71e-4bb8-b4fb-351d0c93cb15%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
