MarkK
bit cruncher
- Local time
- Today, 12:32
- Joined
- Mar 17, 2004
- Messages
- 8,181
I'm not a javascript expert, but I agree that initializing to false here is not essential. Javascript should evaluate the null object to false in the if block.
One reason that you might set it to false is if it's in a loop. The second time around that variable would still hold the object from the previous loop, and you'd want to re-initialize the variable.
Cheers,
One reason that you might set it to false is if it's in a loop. The second time around that variable would still hold the object from the previous loop, and you'd want to re-initialize the variable.
Cheers,