type script array declaration 1

type script array declaration

let strings: string[] = ['Hello', 'World', '!']

Here is what the above code is Doing:
1. We’re creating a variable called strings that is an array of strings.
2. We’re creating a variable called numbers that is an array of numbers.
3. We’re creating a variable called booleans that is an array of booleans.
4. We’re creating a variable called mixed that is an array of mixed types.
5. We’re creating a variable called anyType that is an array of any type.

Similar Posts