I am not clear when and why we should store codes into different .js files or the same file.
Is there any conventions and rules for this?
So, in development it's important to have multiple files to organice your code, but in production you can minify then into one. Uglify is a good tool to monify your code into one file.
Hope it helps.