I have an array that is made inside of a function like this:
function easy() {
var colors = ["white", "red", "orange", "yellow", "green", "blue", "purple", "gray", "white", "red", "orange", "yellow", "green", "blue", "purple", "gray"];
}
I call this function through an onclick on a radio button, but when I do this later:
colors.sort(function() {return 0.5 - Math.random()});
it doesn't work, I think it might be because colors is just a local array. Is there any way to make it work throuhttp://stackoverflow.com/posts/21558099/editghout the whole page?