// for正序 for (var num in arr){ console.log(hello,${arr[num]}!) };
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 ++ };
hello,${arr[number]}
// while倒序 arr.erverse() while(number < arr.length){ console.log(hello,${arr[number]}); number ++ };
Sign in to make a reply
两手都在抓
// 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 ++ };