file1.jsでクラスを定義するとします。
function Customer(){
    this.name="Jhon";
    this.getName=function(){
        return this.name;
    };
};
ここで、file2.jsにCustomerオブジェクトを作成する場合
var customer=new Customer();
var name=customer.getName();
例外が発生しています:Customer is undefined, not a constructor.
しかし、file2.jsで顧客オブジェクトを作成し、それをfile1.jsに渡すと、動作します。
file1.js
    function Customer(){
        this.name="Jhon";
        this.getName=function(){
            return this.name;
        }
    }
    function customer(){
        return new Customer();
    }
file2.js
    var customer=customer();
    var name=customer.getName();
しかし、new Customer()を使用してfile1.jsにcustomerオブジェクトを作成したいと思います。どうすればそれを達成できますか?