View Single Post
  #4 (permalink)  
Old April 1st, 2010, 01:23 PM
PeterPeiGuo PeterPeiGuo is offline
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default couple of ways

Code:
                //one way
                sb.Append("function n(){r = [2, 4, 6, 8, 10, 12]; for(i=0;i<r.length ;i++) alert(r[i]);}");
                //another way
                /*sb.Append("function n(){");
                for (int i = 0; i < r.Length; i++)
                {
                    sb.Append("alert(" + r[i] + ");");
                }
                sb.Append("}");*/