Short Java-script code that will not run, even after debugging
<p>I've been working on this assignment, converting pseudocode to java-script. </p>

<p>I feel confident I have it correctly, but when I try to execute it, I only get a blank white screen.</p>

<p>I put it through the sandbox and managed to correct most of the syntax errors that could keep it from running, but it still refuses to work or display anything.</p>

<p>I'm still learning and I don't know what I would do without the sandbox to help debug my code, but I'm stuck at what to do when it doesn't find anything further.</p>

<p>Any suggestions to debug java-script code for a complete newbie?</p>

<p>This is the code:</p>

<pre><code>&lt;html&gt;
&lt;body&gt;
&lt;script type="text/javascript"&gt;

// Declare variables
var username;           // potential username entered by user
var char1;              // one character extracted from username
var anyDigits = False;  // variable to signify presence of digits
var index;              // loop variable for extracting characters
var BR = "&lt;br /&gt;";
var ES = "";

// Display program heading and requirements and ask for username
document.write("This program helps you set up a valid username." + BR);
document.write("Your username must be at least 8 characters long," + BR);
document.write("   start with a letter, and contain at least 1 digit." + BR);
username = prompt("Please enter your name: ", ES);

// Check for length of username
while (username.length &lt; 8) {
    document.write("ERROR...your username must be at least 8 characters long." + BR);
    username = prompt("Please enter your new username: ", ES);
}

// Check that first character is a letter
// Substring function has three arguments: string, starting position, and ending position
char1 = username.substr(0, 0);
while (char1 !== isLetter()) {
    document.write("ERROR: the first character of your username must be a letter." + BR);
    username = prompt("Please enter your new username: ", ES);
}

// Check that there's at least one digit in the username
while (anyDigits !== True) {
    // Check each character, set anyDigits to true if a digit
    for (index = 1; index &lt; username.substr(index, index); index++) {
        char1 = username.substr(index, index);
        if (isNumeric(char1)) {
            anyDigits = True;
        }
    }

// If anyDigits is still false, no digits were present
    if (anyDigits !== True) {
        document.write("ERROR:...your username must include at least 1 digit." + BR);
        username = prompt("Please enter your new username: ", ES);
    }
}

// Thank the user and end the program
document.write("Thank you! Your new username is: " + username);

&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
