Answers for "array with multiple types in ts"

0

array with multiple types in ts

const foo: (string|number)[] = [ 1, "message" ];
Posted by: Guest on July-16-2021
0

array with multiple types in ts

const foo: [number, string] = [ 1, "message" ];
Posted by: Guest on July-16-2021

Code answers related to "array with multiple types in ts"

Browse Popular Code Answers by Language