Is this really an issue I should worry about?
It seems Firefox, IE7 and Chrome don't care. Functions like the popular
If you declare functions using the
function keyword, you can use them before they're declared. However, if you declare a function via another method (such as using a function expression or the
Function constructor), you have to declare the function before you use it. See this page on the Mozilla Developer Network for more information.
Assuming you declare all your functions with the
function keyword, I think it becomes a programming-style question. Personally, I prefer to structure my functions in a way that seems logical and makes the code as readable as possible. For example, like you, I'd put an
init function at the top, because it's where everything starts from.