_.drop(array, [n=1])

裁剪数组中的前 N 个数组,返回剩余的部分。

<!DOCTYPE html>
<html lang="zh">

    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>数组裁剪</title>
    </head>

    <body>
        <script src="https://cdn.bootcss.com/lodash.js/4.17.10/lodash.min.js"></script>
        <script type="text/javascript">
            var aa = _.drop([1, 2, 3], 2);;
            console.log(aa);
            //[3]
        </script>
    </body>

</html>

 

相关文章:

  • 2021-05-12
  • 2021-07-23
  • 2021-09-15
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-05
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
相关资源
相似解决方案