I've tried Math.random
But then it says it is undefined.
function startBlinking() {
setInterval(function() {
blink();
}, 8000);
}
function blink() {
goggleY = goggleY - 25;
setTimeout(function() {
if (goggleY > goggleY - 25) {
goggleY = goggleY + 25
}
}, 150);
}
is there a way I can make the function call randomly within set numbers? (EX: random(1, 10))? any help would be appreciated :)