var colors = ["red", "blue", "grey"];
var item = colors.splice(0, 1);
console.log(item); //"red"
console.log(colors); //["blue", "grey"]
学习日志 LIUGUOFENG
var colors = ["red", "blue", "grey"];
var item = colors.splice(0, 1);
console.log(item); //"red"
console.log(colors); //["blue", "grey"]