当前位置:网站首页>How typescript is constructed
How typescript is constructed
2022-06-21 18:27:00 【CupidoZ】
// Class object
class Person2 {
readonly peo_type = ' Human type ';
id: number=1000;
name: string='oooo';
constructor(id:number,name:string){
this.id = id;
this.name =name;
}
saySome(){
console.log('I say something!');
}
}
const p6 = new Person2(8888,'Jackey')
p6.saySome()
console.log(p6.id)
console.log(p6.name)
console.log(p6.peo_type);
ts Provides constructors for structured objects The construction method is basically the same as that of other object-oriented languages
边栏推荐
- Under the banana whose R & D accounts for only 3%, is it sunscreen black technology or IQ tax in summer?
- 2022低压电工考试题模拟考试题库及答案
- C语言dll动态链接库
- 2022年R1快开门式压力容器操作操作证考试题库模拟考试平台操作
- 2022年高处安装、维护、拆除上岗证题库及模拟考试
- Redis配置与优化
- On two years' study experience in University
- Node的url模块
- Reids面试题集合 数据结构+穿透雪崩+持久化+内存淘汰策略+数据库双写+哨兵
- AI writes its own code to let agents evolve! The big model of openai has the flavor of "human thought"
猜你喜欢

C语言dll动态链接库

字節跳動提出輕量級高效新型網絡MoCoViT,在分類、檢測等CV任務上性能優於GhostNet、MobileNetV3!

C语言与Lua的交互(实践三)

Gartner 网络研讨会 “九问数字化转型” 会后感

Tcpserver enable multithreading

aws elastic beanstalk入门之简介

ByteDance proposes a lightweight and efficient new network mocovit, which has better performance than GhostNet and mobilenetv3 in CV tasks such as classification and detection!

我被变相降薪了

超分之RLSP

Redis6.0 new features (Part 1)
随机推荐
信创环境下缓存服务Redis集群部署
solidity智能合约面试题
Postman association to complete interface automation test
POSIX信号量
C语言与Lua的交互(实践三)
Use of list
Node的模块导入方式
如何把1000随机分配成10个数
Excess rlsp
What is the S3 protocol that we are talking about every day? This article takes you to understand the story behind S3
Simulation of vector
TypeScript编译生成文件对比
字節跳動提出輕量級高效新型網絡MoCoViT,在分類、檢測等CV任務上性能優於GhostNet、MobileNetV3!
【微服务|Nacos】Nacos实现分布式配置中心进阶版
Can I use line as a product term in the cable industry? Generally not used
堆栈认知——逆向IDA工具的基本使用
Typescript的泛型
TypeScript的类型检查
数字藏品系统开发,NFT艺术品交易平台搭建
研发仅占3%的蕉下,是防晒黑科技,还是夏天的智商税?