Array values transfer between 2 functions
<p>I try to read an array using a function and use it in another function, however the second function does not seem to read it. What I am doing wrong?</p>

<pre><code>  function calcDet () {   
            var A = [];     //generates the array
                for (var i = 0; i &lt; k; i++) {
                    A[i] = [];
                    for (var j = 0; j &lt; k; j++) {   
                        var id = "A" + (i + 1) + (j + 1);                   
                        A[i][j] =  parseFloat(document.getElementById(id).value);               
                    }
                }   
                alert (A);
            return (A); 
        }
        function calcRec() {            
                var s;
                var det;
                alert (A)
        }
</code></pre>
