mirror of https://github.com/jkjoy/sunpeiwen.git
6 lines
157 B
JavaScript
6 lines
157 B
JavaScript
|
exports.spliceOne = function(list, index) {
|
||
|
for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)
|
||
|
list[i] = list[k];
|
||
|
list.pop();
|
||
|
};
|