有没有更简单的方法来交换数组中的两个元素?
var a = list[x], b = list[y]; list[y] = a; list[x] = b;
javascript arrays
arrays ×1
javascript ×1