define array in typescript angular 6 code example Example: array in typescript const count = [...Array(5)]; count.map((_) => console.log('hi'));