Main

September 11, 2006

Neat little example of a useful JavaScript closure

I just picked up the 5th edition of David Flanagan's JavaScript, the Definitive Guide. I find it amusing that that book is the only JavaScript book officially recommended at comp.lang.javascript.

Continue reading "Neat little example of a useful JavaScript closure" »

September 08, 2006

The Simplest Example of Recursion in JavaScript

Here is the simplest example of recursion that I can think of:

(function (arr, count) { 
  alert[count]; 
  if(count < (arr.length -1)) {arguments.callee (arr, ++count)}
})(['This','is','trivial!'], 0);

Why is this important?

Continue reading "The Simplest Example of Recursion in JavaScript" »