/work-learning

The problem in work.Experience is the best teacher.I believe in myself.

Primary LanguageHTML

work-learning

  • 1、querySelector() 和 querySelectAll()
  • 2、addEventListener() 和 removeEventListener()
  • 3、string.split()和array.join()
  • 4、 Array.prototype.slice.call(arguments)能将具有length属性的对象转成数组
  • 5、使用Object.prototype上的原生toString()方法判断数据类型,使用方法如下:Object.prototype.toString.call(value)
  • 6、数组去重:三种方法,①先排序再对比;②使用数组函数indexof(indexOf() 方法可返回某个指定的字符串值在字符串中首次出现的位置。注释:如果要检索的字符串值没有出现,则该方法返回 -1。)③使用es6的set。
  • 7、复制数组:newarr=arr.slice(0)
  • 8、JavaScript里的数组转化新方法Array.From
  • querySelector() 和 querySelectAll()
  • addEventListener() 和 removeEventListener()
  • string.split()和array.join()

string.split()和array.join()

string.split()和array.join()

string.split()和array.join()