Contact: aviboots(AT)netvision.net.il
39,913 questions
51,846 answers
573 users
const array = [7, 8, 9, 0, 3]; const x = array[0]; array[0] = array[array.length - 1]; array[array.length - 1] = x; console.log(array); /* run: [3, 8, 9, 0, 7] */