当前位置:网站首页>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
边栏推荐
- [go deep into kotlin] - get to know flow for the first time
- Xposed bypasses 360 reinforcement to get a real classloader
- Wechat applet text built-in component newline character does not newline reason
- 使用Batch读取注册表
- Sword finger offer 50: the first character that appears only once
- Multithreading tutorial (XXIII) thread safety without lock
- Solution to slow connection speed of ojdbc under Linux system
- Install Oracle Database
- Managing VHDS using batch
- Swap numbers (no temporary variables)
猜你喜欢

Control your phone with genymotion scratch

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

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

es-ik 安装报错

Wechat applet text built-in component newline character does not newline reason

Altiumdesigner2020 import 3D body SolidWorks 3D model

NDK learning notes (IX) POSIX sockect connection oriented communication

MySQL string to array, merge result set, and convert to array

NDK learning notes (13) create an avi video player using avilib+opengl es 2.0

NDK learning notes (V)
随机推荐
Clojure installation of metabase source code secondary development
Jsonobject jsonarray for parsing
Wechat applet, automatic line feed for purchasing commodity attributes, fixed number of divs, automatic line feed for excess parts
Multi thread tutorial (30) meta sharing mode
修复【无 Internet, 安全】问题
Gilde failed to go to the listener to call back the reason record when loading the Gaussian blur image
NDK learning notes (II)
After adding the header layout to the recyclerview, use the adapter Notifyitemchanged (POS,'test') invalid local refresh
handler
Informatica: six steps of data quality management
Why is the smart door lock so popular? What about the smart door locks of MI family and zhiting?
Cocoatouch framework and building application interface
Wechat custom component - style - slot
Get the value of program exit
修复Yum依赖冲突
Manually splicing dynamic JSON strings
使用Batch读取注册表
"All in one" is a platform to solve all needs, and the era of operation and maintenance monitoring 3.0 has come
Deep learning distributed training
Further efficient identification of memory leakage based on memory optimization tool leakcanary and bytecode instrumentation technology