一维数组:[12,23,'珠峰',true...]

二维数组:[12,{name:"珠峰"},[23,34]]

多维数组:[12,{friend:[34,45]}]

数组排序:

ary.sort()

ary.sort(function(a,b){return b-a;});

删除数组最后一项: ary.pop() ary.length--; ary.splice(ary.length-1,1);

找出第n项到第m项 ary.slice(n-1,m)

当前页面一屏幕的宽度 document.documentElement.clientWidth||document.body.clientWidth 获取当前元素的上一个哥哥元素节点(兼容所有浏览器)

数组的基本知识点

 

相关文章:

  • 2021-08-07
  • 2021-11-21
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2021-08-11
  • 2021-07-28
猜你喜欢
  • 2021-10-22
  • 2021-06-17
  • 2021-07-05
  • 2021-11-30
  • 2021-11-28
  • 2022-01-01
  • 2021-03-26
相关资源
相似解决方案