First thing first, why would you reference the JavaScript file from the master page? Well, the best reason for this is whenever you have a application wide javascript, you would like to refer it from one code base instead of adding a reference to all the individual pages. Adding JavaScript reference through master page adds lot more complexities espcially runtime path execution.
Here is the code you need to put in your master page Page_Load event to reference JavaScript file called ApplicationScript.js. Once you have this in the master page, it is available to the all the ASP.NET web forms using this master page.
protected void Page_Load(object sender, EventArgs e)
{
// Add the Javacript in the master page
this.Page.ClientScript.RegisterClientScriptInclude(this.GetType(), “ApplicationJavaScript”, this.ResolveClientUrl(“~/Scripts/ApplicationScript.js”));
}