TypeScriptSyntax
Array Type
Code example
const nums: number[] = [1, 2, 3];Types an array of values.
In TypeScript, array type: types an array of values — const nums: number[] = [1, 2, 3];
const nums: number[] = [1, 2, 3];const nums: number[] = [1, 2, 3];Types an array of values.
Use const nums: number[] = [1, 2, 3];.
Use this pattern: const nums: number[] = [1, 2, 3];
Yes. Use Copy code and adapt the example to your program.
No. The language syntax is the same across operating systems.