zoukankan      html  css  js  c++  java
  • ES5 04 Array扩展

    1. Array.prototype.indexOf(value) : 得到值在数组中的第一个下标
    2. Array.prototype.lastIndexOf(value) : 得到值在数组中的最后一个下标
    3. Array.prototype.forEach(function(item, index){}) : 遍历数组
    4. Array.prototype.map(function(item, index){}) : 遍历数组返回一个新的数组,返回加工之后的值
    5. Array.prototype.filter(function(item, index){}) : 遍历过滤出一个新的子数组, 返回条件为true的值

    基本的PB知识学习之路
  • 相关阅读:
    Web框架本质及浅谈HTTP协议
    mysql
    jQuery
    Css
    html
    socket编程
    面向对象and类
    模块
    装饰器
    cef network-settings
  • 原文地址:https://www.cnblogs.com/IT-XiaoBao/p/14157453.html
Copyright © 2011-2022 走看看