首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >js/ts数组中的"any[]“是什么意思?

问js/ts数组中的"any[]“是什么意思?
EN

Stack Overflow用户
提问于 2017-06-13 07:45:31
回答 0查看 7.6K关注 0票数 1

我现在正在学习Angular2。在这一课中,我读到我必须将数据保存到"any“数组中,然后是这样的代码:

代码语言:javascript
复制
import { Component } from '@angular/core';

import { GithubService } from '../../services/github.service';

@Component({
  selector: 'profile',
  template: `<h1>Profile Component</h1>`,
})
export class ProfileComponent  {
  user:any[];

  constructor(private _githubService:GithubService){
    // this._githubService.getUser().subscribe(user => {console.log(user)});
    this._githubService.getUser().subscribe(user => {
       this.user = user;
    });
  }
}

什么是user:any[];?我试着在github上的google上搜索它,但什么也没找到。不知道要读什么事件。

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44510301

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档