Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript 中的对象 #31

Open
gnosis23 opened this issue Feb 5, 2019 · 0 comments
Open

JavaScript 中的对象 #31

gnosis23 opened this issue Feb 5, 2019 · 0 comments

Comments

@gnosis23
Copy link
Owner

gnosis23 commented Feb 5, 2019

Built-in Objects

  • Intrinsic Objects
  • Native Objects

Instrinsic Objects

标准所定义的,在执行以前创建的对象实例。

  • isFinite, isNaN
  • encodeUri/decodeUri/encodeUriComponent/decodeUriComponent
  • String, Boolean, Object, Symbol, Number
  • Array, Date, Set, WeakSet, Map, WeakMap, Promise, RegExp, Function...
  • parseInt, parseFloat
  • Error, EvalError...
  • Uint8Array, Uint16Array...
  • JSON/Math/Reflect/Proxy

Native Objects

使用内置的构造函数(实现了[[constructor]]方法)创建的对象。常见的构造函数如:

  • Array
  • Function
  • RegExp
  • Date
  • Map, WeakMap, Set, WeakMap
  • Promise

比较好玩的是 Function ,咱们可以用 new Function 来创建函数对象 。

Reference

  • Winter 的 《重学前端》
@gnosis23 gnosis23 added the Basic label Feb 5, 2019
@gnosis23 gnosis23 removed the Basic label Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant