📅  最后修改于: 2022-03-11 15:04:24.888000             🧑  作者: Mango
const string = "0123456789";
console.log(string.slice(0, 2)); // "01"
console.log(string.slice(0, 8)); // "01234567"
console.log(string.slice(3, 7)); // "3456"