JS数组(every、some、filter、forEach、map、reverse、sort、indexOf、lastindexOf方法)
reverse方法JavaScript中数组的reverse()方法用于将数组倒序输出,并且改变了原数组,并且返回的也是新数组。vararr=["8",3,5,6,"a","s"];varcon=arr.reverse();console.log(arr);//结果为:["s","a",6,5,8,3,8]console.log(con);//结果为:["s","a",6,5,8,3,8]sort