回到首页 返回首页
回到顶部 回到顶部
返回上一页 返回上一页

ddee 简单

头像 椅子凳子1 2020.02.07 756 2
project-image
代码
const animals = ['ant', 'bison', 'camel', 'duck', 'elephant'];

console.log(animals.slice(2));
// Expected output: Array ["camel", "duck", "elephant"]

console.log(animals.slice(2, 4));
// Expected output: Array ["camel", "duck"]

console.log(animals.slice(1, 5));
// Expected output: Array ["bison", "camel", "duck", "elephant"]

console.log(animals.slice(-2));
// Expected output: Array ["duck", "elephant"]

console.log(animals.slice(2, -1));
// Expected output: Array ["camel", "duck"]

console.log(animals.slice());
// Expected output: Array ["ant", "bison", "camel", "duck", "elephant"]

材料清单

附件

附件

评论

user-avatar
  • 椅子凳子1

    椅子凳子12022.07.25

    2

    0
    • 椅子凳子1

      椅子凳子12022.07.25

      1

      0