piffy

parametri.js

Sep 13th, 2014 (edited)
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     function incrementa(a) {
  2.         for (let x in a) {
  3.             a[x]++;
  4.         }
  5.  
  6.     }
  7.  
  8.     function stampa(a) {
  9.         for (let x in a) {
  10.             document.write("<li>"+a[x]+"</li>");
  11.         }
  12.  
  13.     }
  14.  
  15.     a = [10,11,12,13,14,15];
  16.     document.write("<ul>");
  17.     stampa(a);
  18.     document.write("<li>---</li>");
  19.     incrementa(a);
  20.     stampa(a);
  21.     document.write("</ul>");
Add Comment
Please, Sign In to add comment