Monday, March 14, 2011

2.4 rince and repeat, with for

this is the 2.2 

var value = 2;
for (var power = 0; power <10; power++) {
   value = 2 * value; show (value); }


this is the 2.3

var chain = "#";
for (var cont = 0; cont <10; cont++) {
  print (chain); chain = chain +"#"; }

No comments:

Post a Comment