JavaScript Reverse Array tanpa memodifikasi
var newarray = array.slice().reverse(); //returns a reversed array without modifying the original
Zubair
var newarray = array.slice().reverse(); //returns a reversed array without modifying the original
var myArray = ["one", "two", "three"];
var cloneArray = myArray.slice();
myArray.splice(1, 1);
console.log(myArray);
console.log(cloneArray);