Hi,
I’m currently trying to learn Javascript and so far I like it, but questions are arriving as I’m learning and here is one, so far most of the examples I have seen in books, tutorial etc. placed the Javascript code either directly in the body section or the header and I was wondering which of these two is the best practice, or even better is it possible to have my Javascript externally as with CSS or some other languages like Actionscript where the code can reside in a classes or external files?
Can someone give me some advice as to what is the best practice when placing your JS code?
Thanks