点击(此处)折叠或打开
- window.onload=function(){
- for (var i = 1; i <=5; i++) {
- console.log(i*i+'for');
- };
- console.log(i*i+"for-out");
- whiletest();
- }
- function whiletest(){
- var i =1;
- while(i<=5){
- console.log(i*i+'while');
- i++;
- }
- console.log(i*i+"while-out");
- }
点击(此处)折叠或打开
- 1for
- 4for
- 9for
- 16for
- 25for
- 36for-out
- 1while
- 4while
- 9while
- 16while
- 25while
- 36while-out