摘要: for循环:for(i=start; i<end; i++) {}while循环: (注意, 若条件一直为真, 则会进入死循环, 浏览器就hang掉)while (condition) { //do something; //change condition;}递归:使用for循环做substringfunction substring(all, start, end) { for(i=start; i<=end; i++) { console.log(all[i]); }substring("eclipse", 1, 4); //clip使用递... 阅读全文
posted @ 2012-04-27 14:40 Rex.M 阅读(423) 评论(0) 推荐(0) 编辑