当前位置:网站首页>JS -- reference type
JS -- reference type
2022-06-11 05:47:00 【Lao Liu selling vegetables at the corner of the street】
Object is an instance of a specific reference type
var person=new Object();====>Object It's a constructor
The two methods :
1
var person =new Object();
person.name="";
person.age=;
2
var person={name:;age:;}
function displayInfo(args) {
var output="";
if(typeof args.name=="string"){
output+="name:"+args.name+"\n";
}
if(typeof args.age=="number"){
output+="Age:"+args.age+"\n";
}
console.log(output);
}
displayInfo({
name:"solin",
age:22
});name: solin
age:22
边栏推荐
- BERT知识蒸馏
- Informatica:数据质量管理六步法
- Share an RSA encryption and decryption tool class, including public key encryption, private key decryption, private key encryption, public key decryption, private key signature, public key verificatio
- Dism command usage summary
- Start the project using the locally configured gradle
- 使用Genymotion Scrapy控制手机
- Cocoatouch framework and building application interface
- 使用Batch枚举文件
- Solution to slow connection speed of ojdbc under Linux system
- Handle double quotation mark escape in JSON string
猜你喜欢

More than 20 cloud collaboration functions, 3 minutes to talk through the enterprise's data security experience

Altiumdesigner2020 import 3D body SolidWorks 3D model

Control your phone with genymotion scratch

Wechat applet learning record

All questions and answers of database SQL practice niuke.com

我们真的需要会议耳机吗?

Jsonobject jsonarray for parsing

View controller and navigation mode
![[元数据]LinkedIn-DataHub](/img/6a/247ee77dfc219d26651e5d93b04c98.png)
[元数据]LinkedIn-DataHub

Wechat applet, automatic line feed for purchasing commodity attributes, fixed number of divs, automatic line feed for excess parts
随机推荐
ReferenceError: server is not defined
If the MAC fails to connect with MySQL, it will start and report an error
Preliminary understanding of multi task learning
Altiumdesigner2020 import 3D body SolidWorks 3D model
Multi thread tutorial (30) meta sharing mode
[go deep into kotlin] - flow advanced
NDK learning notes (IX) POSIX sockect connection oriented communication
Getbackgroundaudiomanager controls music playback (dynamic binding of class name)
qmake 实现QT工程pro脚本转vs解决方案
Get the full link address of the current project request URL
Error:Execution failed for task ':app:buildNative'. & gt; A problem occurred'x/x/x/'NDK build' error resolution
Install Oracle Database
NDK learning notes (14) create an avi video player using avilib+window
How to deal with message blackout and message sending failure of Aurora im
Configure the rust compilation environment
Distributed framework ray - detailed introduction to starting ray and connecting clusters
Multithreading tutorial (XXIII) thread safety without lock
Get the value of program exit
Multithreading tutorial (XXVIII) unsafe class
MinGW-W64安装说明