Skip navigation

Monthly Archives: November 2011


Javascript is a expressive language. In continuation to the previous post, check the following code

//
var arr = ['x','y','z'];

for (var count = -1, l = arr.length, obj; obj = arr[++count], count < l;) {
  alert(obj);
}

// alerts x, y, z
//

Nothing wrong with conventional looping technique, but this is to explore JavaScript’s expressiveness!!!

Follow

Get every new post delivered to your Inbox.

Join 150 other followers