integer empty variable javascript
<p>I don't know why this return undefined?</p>

<pre><code>var array = [6, 4, 6, 9];
var min;
var findminimum =   function(){
        array.reduce(function(prev, cur, index, array) {
                    if (cur &lt; min) {
                        min = cur;
                    }
        }, 0);
        return min;
    };
console.log(findminimum());
</code></pre>

<p>but when i set:</p>

<pre><code>var min = 20;
</code></pre>

<p>it is run ok, so anyone can explain me how to properly define num variable?</p>