Thanks for that. I've just googled JavaScript hoisting. Hadn't heard of it before.   I now see the possible problem it can cause.  Some-time, I'd appreciate you  teaching me the benefits of the early declaration.