Event handler that randomize class when function is trigged
<p>I have an event handler that has 6 arguments that puts in as class name. When Im triging the function its print out all the six arguments directly, </p>

<p>So im trying to create an array that contains the classes, but that dont work.
The console log register that the array is calling a index value inside... but no magic on the screen.
Any ideas ?</p>

<pre><code>        function AddEvent(){
            var AddEvent = "add";
            var addClassArr= document.getElementsByClassName(AddEvent);
            for(var i=0; i&lt;addClassArr.length; i++){
                var addClass = addClassArr[i];
                addClass.addEventListener("click", addDiceEvent, true);
            }
            var diceArray = ["dice dice-side-one",
            "dice dice-side-two",
            "dice dice-side-three",
            "dice dice-side-four",
            "dice dice-side-five",
            "dice dice-side-six",
            "dice dice-side-six"];

 function addDiceEvent() {
             var sides = diceArray[2];

    }    }
        AddEvent(); 
</code></pre>
