What is the difference between any and any[ ]?

后端 未结 4 2189
旧时难觅i
旧时难觅i 2021-02-19 13:34

What is the difference between any and any[ ]?


Example 1 (working as expected)

name1: any;
name2: any[];
this.name1 = this.name2;
4条回答
  •  野性不改
    2021-02-19 14:20

    1. only Any used for single object of any type.
    2. Any[] is for array of objects with type Any.

提交回复
热议问题