当前位置:网站首页>Part 30 supplement (30) ECMAScript object
Part 30 supplement (30) ECMAScript object
2022-06-27 17:03:00 【Embedded workplace】
1、 Reference type
Reference types are often called classes (class), in other words , Encountered reference value , What we're dealing with is objects .
The object is new Operator plus the name of the object to be instantiated . for example , The following code creates Object Instance of object :
var f = new Object()If there are no parameters , Brackets can be omitted :
var f = new Object- Although parentheses are not required , But it is better to use parentheses ;
2、Object object
- CMAScript All objects in are inherited from this object ;
- Object All properties and methods in the object appear in other objects ;
Object Object has the following properties :
constructor
Reference to the function that created the object ( The pointer ). about Object object , The pointer points to the original Object() function .
Prototype
A reference to the object prototype of the object . For all objects , It returns... By default Object An instance of an object .
Object Object also has several methods :
hasOwnProperty(property)
Determine whether an object has a specific attribute . have to
边栏推荐
- 锚文本大量丢失的问题
- d3dx9_ How to repair 33.dll? d3dx9_ What if 33.dll is lost?
- A robot is located in the upper left corner of an M x n grid. The robot can only move down or right one step at a time. The robot attempts to reach the lower right corner of the grid. How many differe
- Mihayou sued Minmetals trust, which was exposed to product thunderstorms
- QT5.5.1桌面版安装配置过程中的疑难杂症处理(配置ARM编译套件)
- #yyds干货盘点#简述chromeV8引擎垃圾回收
- 07. Express routing
- Pragma once Usage Summary
- Deeply digitise, lead cloud nativity and serve more developers
- About how vs2019c # establishes the login interface, the user name and password entered must match the records in the access database
猜你喜欢
随机推荐
leetcode 142. Circular linked list II
软件测试学习-黑马程序员,软件测试学习大纲
Oracle concept II
#yyds干货盘点#简述chromeV8引擎垃圾回收
Etcd可视化工具:Kstone部署(一),基于Helm快速部署
Community sharing jumpserver in the eyes of senior open source users: a fortress machine for "Crazy" iteration
Autodesk Navisworks 2022软件安装包下载及安装教程
【牛客刷题】NowCoder号称自己已经记住了1-100000之间所有的斐波那契数。 为了考验他,我们随便出一个数n,让他说出第n个斐波那契数。如果第n个斐波那契大于6位则只取后6位。
QT5 之信号与槽机制(演示控件自带的信号与槽函数关联)
leetcode 92. Reverse linked list II
What are the password requirements for waiting insurance 2.0? What are the legal bases?
深耕数字化,引领云原生,服务更多开发者
Why should string be designed to be immutable?
d3dx9_ How to repair 33.dll? d3dx9_ What if 33.dll is lost?
Raspberry pie preliminary use
关于#mysql#的问题:问题遇到的现象和发生背景
Annual comprehensive analysis of China's audio market in 2022
Awk determines whether the first column is greater than 1. If it is greater than 1, the row will be printed
# Cesium实现卫星在轨绕行
Leetcode 33. Search rotation sort array








