Javascript - using before defined
<p>Recently I asked a question regarding my triangle calculations Coded in JavaScript. Basically I went to JSLint (<em>A JavaScript debug facility</em>) to acquire some data as to why nothing inside the function and procedure is working where as it all looks good and I followed previously given advice, but I believe this is a separate issue. I have posted the code below:</p>

<pre><code>    &lt;html&gt;
&lt;head&gt;
&lt;link href="stylesheet/stylesheet.css" rel="stylesheet" type="text/css"&gt;

&lt;script language="Javascript" type="text/javascript"&gt;

/*  Key/Legend
Var
    inp1 = input1
    inp2 = input2
    inp3 = input3
    Triangle_Inputs = Form Name

    */

/* Notes

    In computing, a parser is one of the components in an interpreter or 
    compiler that checks for correct syntax and builds a data structure 
    (often some kind of parse tree, abstract syntax tree or other hierarchical structure) 
    implicit in the input tokens.


    Technique
    if (side1 is equal to side2 AND side 2 is equal to side3) {equalitateral}

    if (side1 is equal to side2 AND side 2 doesn't equal to side3) {isosceles}

    if (side1 doesn't equal to side2 AND side2 doesn't equal to side 3 AND side 3 doesn't equal side 1) {scalene}

    http://www.w3schools.com/js/js_comparisons.asp

    */


function checkinputs(){
/* Var = parseInt(document.Name_Of_Element_Form.Field_Name(Input).value); */
/* Input Fields */
inp1 = parseInt(document.Triangle_Inputs.input1.value);
inp2 = parseInt(document.Triangle_Inputs.input2.value);
inp3 = parseInt(document.Triangle_Inputs.input3.value);
/* Side options */
sideA = (inp1);
sideB = (inp2);
sideC = (inp3);
    if (sideA == sideB &amp;&amp; sideB == sideC) {
    alert("Equalateral");
    }
    if (sideA == sideB &amp;&amp; != sideC) {
    alert("Isosceles");
    }
    if (sideA != sideB == sideC) {
    alert("Isosceles");
    }
    if (sideA != sideB != sideC != sideA) {
    alert("Scalene!");
    }
}
&lt;/script&gt;


&lt;/head&gt;
&lt;body&gt;
&lt;div id="Container"&gt;

&lt;div id="Header"&gt;&lt;h1&gt;&lt;/h1&gt;&lt;/div&gt;

        &lt;div id="Content_1"&gt;
                &lt;div id="Explanation"&gt;
                This calculator will determine what
                triangle you have made depending on
                the integer values in the input fields.

                &lt;/div&gt;
                &lt;div id="Form"&gt;
                    &lt;FORM NAME="Triangle_Inputs" METHOD="GET"&gt;
                    Enter the triangle values below: &lt;br&gt;
                    &lt;p&gt;
                    &lt;h4&gt;Side 1: &lt;/h4&gt;&lt;BR&gt;
                    &lt;INPUT TYPE="Integer" NAME="input1" VALUE=""&gt;&lt;P&gt;
                    &lt;h4&gt;Side 2: &lt;/h4&gt;&lt;BR&gt;
                    &lt;INPUT TYPE="Integer" NAME="input2" VALUE=""&gt;&lt;P&gt;
                    &lt;h4&gt;Side 3:&lt;/h4&gt; &lt;BR&gt;
                    &lt;INPUT TYPE="Integer" NAME="input3"  VALUE=""&gt;&lt;P&gt;
                    &lt;INPUT TYPE="button" NAME="Submit" Value="Submit" Class="Submit" onClick="checkinputs()"&gt;
                    &lt;/FORM&gt;
                &lt;/div&gt;
                &lt;div id="Verbal_Output"&gt;
                    &lt;h2&gt;You made a:&lt;/h2&gt;
                    &lt;p&gt;        
                    &lt;h2&gt;Triangle&lt;/h2&gt;
                &lt;/div&gt;

            &lt;/div&gt;
            &lt;p&gt;
            &lt;p&gt;
        &lt;div id="Content_2"&gt;

        &lt;div id="Image_Output"&gt;asdad&lt;/div&gt;
    &lt;/div&gt;      
&lt;/div&gt;



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

<p>This is the site itself, Ignoring the div tags. I want to know why I can't click the button and more the the point why JSlint says:</p>

<blockquote>
  <p>inp1 = parseInt(document.Triangle_Inputs.input1.value);</p>
  
  <p>line 39 character 1 'inp1' was used before it was defined.</p>
</blockquote>

<p>for the inp1,inp2 and inp3.</p>

<p>edit:</p>

<p>My understanding of using Variables was incorrect, I was listing them without using ","s.
Instead I was calling one variable and the rest I wasn't.</p>
