Blink effect
JavaScript
function getInterval() {
var min = 1;
var max = 6;
// and the formula is:
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function blink() {
var newTimeout = getInterval() * 1000;
console.log('New timeout: ' + newTimeout);
setTimeout(blink, newTimeout);
}
blink();