Prototype Enumerable
In the previous post, I iterated over an array with the following code...
You can do this in one line of code using prototype's Enumerable.each method...
var ids=new Array('1','2');for (var i=0;i<ids.length;i++) $(ids[i]).style.display = 'none';['1','2'].each(function(id,index) {$(id).style.display = 'none';});