Null vs undefined - The Battle for Nothing!

Hey all,

So…I’m new to AS3. However, I come from a pretty diverse programming background, and my C/C++ roots have made me [necessarily] fond of ‘null’ and its ubiquitous usage.

However, in AS3, there are two different ways to assign ‘Nothing’ to a variable - null and undefined. Certainly, these values mean different things. I’ve got some guesses on which should be when in AS3, but I’d like to hear what you all think.

When should null be used?
When should undefined be used?
Why do we need both? Why not just null or undefined?

Looking forward to your thoughts,
Rich