News for hackers. Stuff that matters.
Re:JavaScript Interview Question by heed on Thursday January 20, 2011 @02:50PM (#2125010)
Wouldn't var i have to be set to -1:

  for (var i = -1; els[++i];)  ?
Otherwise, the alert won't trigger on the first li element.
Re:JavaScript Interview Question by lhorie on Thursday January 20, 2011 @02:56PM (#2125047)
Hah, good catch. Was thinking of i++ for some reason. Fixed.