CSSPod
  • Home
  • Contact
  • 求贤

Array

A collection of 1 post

Array

JavaScript清空数组的方法

方法1:将数组 length 赋值为0 var arr= [1,2,3,4]; arr.length = 0; console.log(arr); // 输出 [],数组被清空 Prototype 中数组的 clear 方法和 mootools 库中数组的 empty() 方...

  • minwe
    minwe
2 min read
CSSPod © 2023
Latest Posts Ghost