Q: user input sets array length I have a text box that a user puts in a number. This number will set the array length and after that the user will be prompted for numbers. The amount of times the user is prompted is based on this number. The issue I am having is I cannot get the value in the text box to set the length. here is the code that I am using 
<script>
        var arraySize = document.getElementById("txtSize");


        function startProcess() {

           alert("the value is " + arraySize.value);



        }

     </script>

I just have the alert box for testing to see if it is working, but I get an error Line: 19
Error: Unable to get property 'value' of undefined or null reference
the rest of the HTML code is 
<
p>
        Enter Size of the Array:
        <input type="text" id="txtSize" value="">&nbsp;&nbsp;&nbsp;
        <input type="button" value=" START " onclick="startProcess()">
    </p>
    <p>
        <table>
            <tr>
                <td>Array Sum</td>
                <td>Array Product</td>
            </tr>
            <tr>
                <td><input type="text" id="txtSum" value="")></td>
                <td><input type="text" id="txtProd" value="")></td>
            </tr>
        </table>
    </p>


A: Your first line is bad, you forgot to get the value:
enter code herevar arraySize = document.getElementById("txtSize");
It should be like this:
 var arraySize = document.getElementById("txtSize").value;
