<html> <head> <script type='text/javascript'> a = new Array(); function unico(){ if(a.length > 100){ clearInterval(id); imprimir(); } else { a.push(new Date().getTime()); } } function imprimir(){ for(var i = 0; i < a.length; i++){ document.write(i +" = " + a[i] + "<br/>") } for(var i = 0; i < a.length; i++){ if(a[i] == a[++i]){ alert('Hay un numero repetido'); } } } function limpiar(){ } </script> </head> <body> <script type='text/javascript'> id = setInterval(unico, 100); </script> </body> </html>