假设我有两个不同的数组:
const a = ['a', 'b', 'c', 'd', 'e', 'f'];
和
const b = ['g', 'h', 'i', 'j', 'k', 'l'];
和 I want to place 'c' on the position of 'l' 和 vice-versa, like so:
const a = ['a', 'b', 'l', 'd', 'e', 'f'];
const b = ['g', 'h', 'i', 'j', 'k', 'c'];
我怎么能归档这个?
I do it like this because I'm organizing a set of values in pages, 和 each page contains at max 6 elements