Javascript is pretty tricky as its pretty easy in the beginning and you can write pretty cool stuff without knowing that much about the language. But then at the same time its very hard to master it (by no means do I master javascript). I would recommend you check out this site. They have some relay good videos about javascript and other front end stuff. I have learned a lot from there.
If you have lots of javascript you should probably try to find a good design pattern that fits you. I guess you are already using some kind of javascript framework, like jquery? If not, you should. For javascript intensive sites I find prototype very suitable. Its a more object oriented framework that I like a lot when you have to handle a lot of javascript.
The problem you describe with methods not waiting for each other happens because you are doing something async, like a ajax call. This can be avoided by using a callback function. Something like this:
function methodThatDoesSomethingAsync(callback) {
//Do something async like ajax call
//You use the callback when you have the data you want to return
if(callback) {
callback(data);
}
}
methodThatDoesSomethingAsync(function(data) {
//Do what you want with the data
});