console.log value from random array give me variable is not defined . JavaScript
<p>Im trying to get the value of the array, but gives me the error rand ( my variable) is not define.
The array is working fine and adding the values to a class.. So i cant really understand why its not working.</p>

<p>This is my function.</p>

<pre><code>     function AddEvent(){ 
            var AddEvent = "add"; 
            var addClass= document.getElementsByClassName(AddEvent); 
            addClass=addClass[addClass.length-1]; 
            addClass.addEventListener("click", addDiceEvent, true); 
            var diceArray = Array=[ 
            "one", 
            "two", 
            "three", 
            "four", 
            "five", 
            "six"]; 
            console.log("when set",addClass);
            function addDiceEvent() { 
                var rand = diceArray[Math.floor(Math.random() * diceArray.length)]; 
                dicesides_func.call(addClass,rand); 
               }      


    }    
// Console.log(rand) gives the error # Uncaught ReferenceError: rand is not defined #
AddEvent(); 
</code></pre>
