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

ddee & > < 简单

头像 amy微信 2020.02.07 800 3
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"]

材料清单

附件

附件

& & amy &

评论

user-avatar
  • ASH腻

    ASH腻2025.05.14

    2

    0
    • amy微信

      amy微信2022.07.25

      2

      0
      • amy微信

        amy微信2022.07.25

        1

        0