views:

97

answers:

2
myColl.y = [y for each (y in myColl.y) if (y != myThing.getY())];

I understand what this is doing, returning all the 'y' items that are not the current one...

But, what is the concept called here with the brackets? I would like to read up on what this is , syntax, etc.

+8  A: 

It's an array comprehension.

Apparently this was introduced in Javascript 1.7.

Stefan Kendall
+3  A: 

Array comprehensions

sberry2A