2025-09-04 18:10

Status: child

Tags: typescript computer-science

Arrays in Typescript

Code

let prices:number[] = [100, 200, 300];
 
let fruit:string[] = ["hello", "world"];
 
let array: (string | number)[] = ["apple", true, "orange", false];

References

FreeCodeCamp