• 《深入理解JavaScript》—— ECMAScript5 新特性


    (1) 标准库的新功能

    1. 元编程

    ① 获取和设置原型

    —— Object.create()

    —— Object.getPrototypeOf()

    ② 通过属性描述符管理属性特性

    —— Object.defineProperty()

    —— Object.defineProperties()

    —— Object.create()

    —— Object.getOwnPropertyDescriptor()

    ③ 列出属性

    —— Object.keys()

    —— Object.getOwnPropertyNames()

    ④ 保护对象

    —— Object.preventExtensions()

    —— Object.isExtensible()

    —— Object.seal()

    —— Object.isSealed()

    —— Object.freeze()

    —— Object.isFrozen()

    (2) 新方法

    ① 新方法 String.prototype.trim()

    ② 通过方括号访问字符

    ③ 新数组方法

    —— Array.isArray()

    —— Array.prototype.every()

    —— Array.prototype.some()

    —— Array.prototype.filter()

    —— Array.prototype.forEach()

    —— Array.prototype.indexOf()

    —— Array.prototype.lastIndexOf()

    —— Array.prototype.map()

    —— Array.prototype.reduce()

    ④ 新Date方法

    —— Date.now()

    —— Date.prototype.toISOString()

    (3) JSON

    支持JSON。

    —— JOSN.parse()

    —— JOSN.stringify()

    —— 一些内建对象具有特殊的toJSON方法:

    Boolean.prototype.toJSON()

    Number.prototype.toJSON()

    String.prototype.toJSON()

    Date.prototype.toJSON()

  • 相关阅读:
    Spring实现声明式事务
    Spring整合MyBatis
    Spring AOP
    代理模式
    Bean的作用域
    Spring的配置
    HQL题目记录以及解题思路--持续更新
    数仓学习之路一:数仓理论
    DBeaver连接Hive遇到的坑
    MySQL常见面试题
  • 原文地址:https://www.cnblogs.com/luohaoran/p/5988063.html
Copyright © 2020-2023  润新知