Example 1 — Official: Move "a" to Index 2
Take the first item out and place it third.
const letters = ["a", "b", "c", "d", "e", "f"];
console.log(R.move(0, 2, letters));
// → ["b", "c", "a", "d", "e", "f"] How It Works
- Take. Index
0holds"a"; it is removed. - Shift.
"b"and"c"slide one place left. - Place.
"a"is inserted at index2of the result.
