<!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 obj = { 'a': 5};
        var arr = [1,2,3,4]
        console.log(_.at(obj,'a'))
        console.log(_.at(arr,3))
    </script>
</body>
</html>

 

相关文章:

  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2022-12-23
  • 2021-11-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-02-28
  • 2021-12-11
  • 2022-12-23
相关资源
相似解决方案