Contact: aviboots(AT)netvision.net.il
39,894 questions
51,825 answers
573 users
let arr = [9, 333, 7, 0, 2, 1, 8, 6]; [arr[1], arr[4]] = [arr[4], arr[1]]; console.log(arr); /* run: [ 9, 2, 7, 0, 333, 1, 8, 6] */