SnipZard
Search snippets
Home
Portfolio
Contact
Tuple
A tuple is a type that allows you to store an array with a fixed number of elements of different types.
Snippet:
let
user
:
[
string
,
number
]
=
[
"John"
,
25
]
;
Copy Code
Example:
let
point
:
[
number
,
number
]
=
[
10
,
20
]
;
Copy Code