SHARE
TWEET

Untitled

a guest Jul 19th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var multiplo = ["aguacate ","albaricoque ","ananá","arándano","arándano ","banana","cereza ","ciruela","higo","kiwi","lima","limón","mandarina","mango","manzana","maracuyá","melocotón ","melón","membrillo",];
  2. var cont = 0;
  3. var valorc = "";
  4. var limite = 5;
  5.  
  6. function parar() {
  7.  
  8.  
  9. var e = setInterval( function() {
  10.  
  11. switch(cont) {
  12.     case 1:
  13.         valorc = multiplo[0];
  14.     break;
  15.  
  16.     case limite * 1:
  17.         valorc = multiplo[1];  
  18.     break;
  19.  
  20.     case limite * 2:
  21.         valorc = multiplo[2];
  22.     break;
  23.  
  24.     case limite * 3:
  25.         valorc = multiplo[3];
  26.     break;
  27.  
  28.     case limite * 4:
  29.         valorc = multiplo[4];  
  30.     break;
  31.  
  32.     case limite * 5:
  33.         valorc = multiplo[5];  
  34.     break;
  35.  
  36. }      
  37.         cont++;
  38.         console.log(cont)
  39.         console.log(valorc)
  40.     if (cont === 100) {
  41.  
  42.     clearInterval(e);
  43.     }
  44.  
  45. }, 300);
  46.  
  47. }
  48. parar();
  49.      
  50. switch(cont) {
  51.     case 1:
  52.         valorc = multiplo[0];
  53.     break;
  54.  
  55.     case limite * 1:
  56.         valorc = multiplo[1];  
  57.     break;
  58.  
  59.     case limite * 2:
  60.         valorc = multiplo[2];
  61.     break;
  62.  
  63.     case limite * 3:
  64.         valorc = multiplo[3];
  65.     break;
  66.  
  67.     case limite * 4:
  68.         valorc = multiplo[4];  
  69.     break;
  70.  
  71.     case limite * 5:
  72.         valorc = multiplo[5];  
  73.     break;
  74.      
  75. for( var i=cont;i<multiplo.length; i++ ) {
  76. switch(cont) {
  77.     case 1:
  78.         valorc = multiplo[i];
  79.     break;
  80.  
  81.     case limite * 1:
  82.         valorc = multiplo[i];  
  83.     break;
  84.  
  85.     case limite * 2:
  86.         valorc = multiplo[i];
  87.     break;
  88.  
  89.     case limite * 3:
  90.         valorc = multiplo[i];
  91.     break;
  92.  
  93.     case limite * 4:
  94.         valorc = multiplo[i];  
  95.     break;
  96.  
  97.     case limite * 5:
  98.         valorc = multiplo[i];  
  99.     break;
  100.  
  101. }}
  102.      
  103. for( var i=cont;i<multiplo.length; i++ ) {
  104. switch(cont) {
  105.     case limite * cont:
  106.         valorc = multiplo[i];
  107.     break;
  108.  
  109. }}
  110.      
  111. for( var i=cont;i<multiplo.length; i++ ) {
  112.     if (cont % 5 === 0) valorc = multiplo[i];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top