当前位置:网站首页>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 knowledge distillation
- Start the project using the locally configured gradle
- NDK learning notes (14) create an avi video player using avilib+window
- NDK learning notes (VII) system configuration, users and groups
- 修复【无 Internet, 安全】问题
- Exploration of kangaroo cloud data stack on spark SQL optimization based on CBO
- If the MAC fails to connect with MySQL, it will start and report an error
- Dism command usage summary
- "All in one" is a platform to solve all needs, and the era of operation and maintenance monitoring 3.0 has come
- NDK learning notes (XI) POSIX sockect local communication
猜你喜欢

Wechat applet learning record

Control your phone with genymotion scratch

深度学习分布式训练

Multithreading tutorial (XXVII) CPU cache and pseudo sharing

BERT知识蒸馏

那个酷爱写代码的少年后来怎么样了——走近华为云“瑶光少年”

NDK R21 compiles ffmpeg 4.2.2+x264 and converts video files using ffmpeg

Redis setup (sentinel mode)

Implementation of data access platform scheme (Youzu network)
![[元数据]LinkedIn-DataHub](/img/6a/247ee77dfc219d26651e5d93b04c98.png)
[元数据]LinkedIn-DataHub
随机推荐
Delegation agreement, data source agreement and advanced view in view
微信小程序text内置组件换行符不换行的原因-wxs处理换行符,正则加段首空格
Wxparse parsing iframe playing video
Set the IP address using batch
Fix Yum dependency conflict
Manually splicing dynamic JSON strings
Further efficient identification of memory leakage based on memory optimization tool leakcanary and bytecode instrumentation technology
Clojure installation of metabase source code secondary development
Use of vlayout
使用Batch枚举文件
How to deal with message blackout and message sending failure of Aurora im
ImageView supporting single finger sliding and double finger scaling
Informatica:数据质量管理六步法
Install Oracle Database
NDK learning notes (x) POSIX socket for connectionless communication
Getbackgroundaudiomanager controls music playback (dynamic binding of class name)
PageHelper page 2 collections in the same interface
如何让灯具智能化,单火、零火智能开关怎么选!
String sorting times --- bubble sorting deformation
创建酷炫的 CollectionViewCell 转换动画