📅  最后修改于: 2022-03-11 15:01:29.060000             🧑  作者: Mango
var fruits = new Array ( "apple", "pear", "orange", "banana" );
alert ( fruits.slice ( 1, 3 ) ) // Displays "pear,orange"
alert ( fruits.slice ( 0, -2 ) ) // Displays "apple,pear"
alert ( fruits.slice ( 2 ) ) // Displays "orange,banana"