Random Quote Machine button don't work

Random Quote Machine button don't work
0

#1

Hey guys i have problem with my new quote button. I am trying to make it change color when clicked, but doesn’t perform anything. How do i fix it?


#2

You need to check your browser’s console (Ctrl+Shft+J in Chrome), because you have an error in your JavaScript in this line:

var randomNumber = Math.floor(Math.random()*color.length);

You are using a variable called color, but it is not defined anywhere.


#3

Thanks, i see color instead of colors. Such a stupid mistake.