Why does this give "undefined" error?
<p>I am trying to get the user to put something into the text area and  the output should be what he wrote repeapiting x amount of times, but I get an error "document.forme is undefined".</p>

<p>Can you please help me understand why it is undefined?</p>

<p>My code:</p>

<pre><code> &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
 &lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
&lt;title&gt;input home work&lt;/title&gt;
&lt;script type="text/javascript"&gt;


 var help= document.forme.tryout.value;

 for (x=1; x&lt;=10;x++){

 function numberCheak (){

     document.write("this is"+"  "+help++);

     }


 }
  &lt;/script&gt;


  &lt;/head&gt;

 &lt;body&gt;
&lt;form name="forme"&gt;

&lt;input name="tryout" type="text" /&gt;
  &lt;input type="button" value="click me" onClick="numberCheak();"/&gt;


&lt;/form&gt;

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