一、TypeError

  1. function TypeJudge(attr){
  2. if(!Array.isArray(attr)){
  3. throw new TypeError("attr必须是一个数组")
  4. }
  5. }