//反转数组
var d = [1,2,3,4,5];
console.log(d);
//反转,5,4,3,2,1
d.reverse();
console.log(d);
//helloworld 字符串反转显示:dlrowolleh
var h = "helloworld";
var fz = h.split("");
fz.reverse();
var zh = fz.join("");
console.log(zh);
//反转数组
var d = [1,2,3,4,5];
console.log(d);
//反转,5,4,3,2,1
d.reverse();
console.log(d);
//helloworld 字符串反转显示:dlrowolleh
var h = "helloworld";
var fz = h.split("");
fz.reverse();
var zh = fz.join("");
console.log(zh);
info 还没有任何评论,你来说两句呐!