Discuss / JavaScript / 小结

小结

Topic source

// for正序 for (var num in arr){ console.log(hello,${arr[num]}!) };

// for倒序 for (var num in arr.reverse()){ console.log(hello,${arr[num]}!) };

// while正序 number = 0; while(num < arr.length){ console.log(hello,${arr[number]}); number ++ };

// while倒序 arr.erverse() while(number < arr.length){ console.log(hello,${arr[number]}); number ++ };


  • 1

Reply