
Originally Posted by
ggerke
Ah, okay - I do like that better. Cleaner and simple to read. The time it'd take for doing the function call to potentially add the leading zero should be negligible since it's only for one call and not bazillions of 'em, yes?
One of the nice things about javascript is that it's designed to handle functions with great ease.
Here's a quote from Douglas Crockford in a piece called The world's most misunderstood programming language (bold added by myself)
JavaScript's C-like syntax, including curly braces and the clunky for statement, makes it appear to be an ordinary procedural language. This is misleading because JavaScript has more in common with functional languages like Lisp or Scheme than with C or Java. It has arrays instead of lists and objects instead of property lists. Functions are first class. It has closures. You get lambdas without having to balance all those parens
Bookmarks