JavaScript beginner: Trouble with strings
<p>At the top of my code I need to ask the users if they wish to play a game. Using the string function to look at the first letter of their answer and make it lower case. If their answer == "y" then play the game. I need help taking the first letter of Yes, and making it lower case.</p>

<pre><code>&lt;HTML&gt;
&lt;HEAD&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;

&lt;FORM NAME="testform"&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;/FORM&gt;

&lt;INPUT id="attempts" TYPE="text" NAME="inputbox" VALUE="" /&gt;
&lt;INPUT id="zero" TYPE="button" NAME="resetbox" VALUE="Reset " onclick="reset()" /&gt;

&lt;SCRIPT type="text/javascript"&gt;

varattempts = 0
x = Math.round((Math.random()*19))+1    
var tip

tip=prompt("Do you want to play a game?")

while(tip == "y")

{

    var Guess;
    document.getElementById('attempts').value = 0;
    do {

    Guess = prompt("Pick a number between 1 and 20","")
    if (Guess === null) break;
    document.getElementById('attempts').value = parseInt(document.getElementById('attempts').value)+1
      } while (Guess!=x);

    if (Guess == x)

    {

    alert("You guessed right!")

    }
}

function reset()

{
    varattempts=0;
    document.getElementById('attempts').value = 'Attempts: 0'; 
}

&lt;/SCRIPT&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
</code></pre>
