英文:
Types of declaration methods Angular 6
问题
我对以下两种声明有些困惑。
```typescript
filterabcData: abcHeader[] = [];
和
searchedabcDetails = new abcHeader();
有人可以帮助我吗?
<details>
<summary>英文:</summary>
I am having some confusion about below 2 types of declarations.
```typescript
filterabcData: abcHeader[] = [];
and
searchedabcDetails = new abcHeader();
Anyone help me for this.
答案1
得分: 1
- 第一个声明表示filterabcData是一个数组,其中包含abcHeader类型的项目。
- 第二个声明指出你正在创建一个abcHeader类的对象,并将其存储在searchedabcDetails中。
英文:
- First one declaration says that filterabcData is an array having
items of abcHeader type. - Second declaration is pointing that you are creating an object of abcHeader class and storing it inside searchedabcDetails.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论