ES5 小结


Trailing commas are ok
- No reserved words for property names
- NaN, Infinity, undefined : are all constants
- parseInt() defaults to radix 10
- /regexp/ produces new reg ex object every time
- JSON.parse(), JSON.stringify()
- Function.prototype.bind
- String.prototype.trim
- Array.prototype.every, filter, forEach, indexOf, lastIndexOf, map, reduce, reduceRight, some,
- Date.now()
- Date.prototype.toISOString
- new Date(string) and Date.parse(string) will try ISO format 1st
- Array.isArray()
- Object.keys(), Object.create(), Object.defineProperty, Object.defineProperties,
Object.getOwnPropertyDescriptor(), Object.getOwnPropertyNames(obj), Object.getPrototypeOf(obj)
- Object.seal(), Object.freeze(), Object.preventExtensions(), Object.isSealed(), Object.isFrozen(),
Object.isExtensible()
- Property attributes: writeable, value, enumerable, configurable, get, set

- 'use strict';
- Strict Mode:
No more implied global variables within functions.
this is not bound to the global object by function form.
apply and call do not default to the global object.
No with statement.
Setting a writeable: false property will throw.
Deleting a configurable: false property will throw.
Restrictions on eval.
eval and arguments are reserved.
arguments not linked to parameters.
No more arguments.caller or arguments.callee.
No more octal literals.
Duplicate names in an object literal or function parameters are a syntax error


references:
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array#Methods
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值