Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.

Quick

  • ($a, $b....) = unpack("A2A7...", $packed)
  • push( array, list )

Saturday, June 2, 2012

Javascript variable initialisation

Don't expect to ++ on a variable if you haven't set it to contain a number. Even if it has been declared, it is not initialised to 0 or even to an undefined numeric value.

Similarly, you can't set properties on a new variable unless it's been initialised to {}, and you can't set array index values unless it's been initialised to [].

Followers

Blog Archive