当前位置:网站首页>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
边栏推荐
- [元数据]LinkedIn-DataHub
- Multithreading tutorial (XXVI) field updater and atomic accumulator
- Wechat custom component - style - slot
- Es IK installation error
- Multithreading tutorial (XXVII) CPU cache and pseudo sharing
- Multi thread tutorial (30) meta sharing mode
- Aurora im live chat
- Swap numbers (no temporary variables)
- 数组部分方法
- 【深入kotlin】 - 初识 Flow
猜你喜欢

微信自定义组件---样式--插槽

Do we really need conference headphones?

Maximum number of points on the line ----- hash table solution

Error:Execution failed for task ':app:buildNative'. & gt; A problem occurred'x/x/x/'NDK build' error resolution

Jsonobject jsonarray for parsing

Redis setup (sentinel mode)

"All in one" is a platform to solve all needs, and the era of operation and maintenance monitoring 3.0 has come

Write a list with kotlin

1. use alicloud object OSS (basic)

Wechat custom component - style - slot
随机推荐
Multithreading tutorial (XXIII) thread safety without lock
ReferenceError: server is not defined
BERT知识蒸馏
Wxparse parsing iframe playing video
Multi thread tutorial (XXIX) immutable design
智能门锁为什么会这么火,米家和智汀的智能门锁怎么样呢?
MinGW-W64安装说明
getBackgroundAudioManager控制音乐播放(类名的动态绑定)
NDK learning notes (XI) POSIX sockect local communication
Slide the receleview horizontally to the far right to listen to the page loading function
Why is the smart door lock so popular? What about the smart door locks of MI family and zhiting?
Convert result set of SQL to set
微信自定义组件---样式--插槽
Maximum number of points on the line ----- hash table solution
More than 20 cloud collaboration functions, 3 minutes to talk through the enterprise's data security experience
使用Genymotion Scrapy控制手机
NDK learning notes (I)
Install Oracle Database
Méthode de la partie du tableau
DISM命令使用小结