JavaScript in multiple files
<p>I Have created two JavaScript files.One file is "validators.js" and other is "UserValidations.js". </p>

<p>Here is the code for validators.js</p>

<pre><code>function isBlankString(value) {
    if (value.replace(/\s/g, "") == "") {
        return true;

    } else {
        return false;
    }
}
</code></pre>

<p>In other js file I have defined function for validating user name like this.</p>

<pre><code>function validateUsername(element) {

    var username = element.value;

    if(value.replace(/\s/g, "") == ""){
        //nothing to validate
        return;
    }else{
        //validation logic
    }

}
</code></pre>

<p>Now as it is obvious i should have used isBlankString(value) method to check string length. But I  am clue less about how can i use the function defined in other file?</p>
