/**
* 将数组中索引号为 sID 的项移动到索引为 tID 项的后面。此方法将改变数组项的顺序。
* @param {number} sID 要移动的索引号
* @param {number} tID 目标索引号,包含要移动的项的索引号在内。
* @returns {undefined} 无返回值
* @example ["a","b","c","d","e","f","g"].move(2,0) 结果为 ["c","a","b","d","e","f","g"]
* ["a","b","c","d","e","f","g"].move(2,5) 结果为 ["a","b","d","e","f","c","g"]
*/
Array.prototype.move = function (sID, tID) {
if (sID >= this.length || tID >= this.length || sID < 0 || tID < 0 || sID == tID) { return; }
let sItem = this.splice(sID, 1)[0];//删除并返回要移动的项
//添加到目标位置。现在的数组少了一项,所以 tID 就是目标项后面的项索引
this.splice(tID, 0, sItem);
};