Check out example codes for "typescript integer". It will help you in understanding the concepts better.

Code Example 1

// There is no int type, use number
const myInt: number = 17;
const myDecimal: number = 17.5

Code Example 2

let list: number[] = [1, 2, 3];

Code Example 3

let decimal: number = 6;
let hex: number = 0xf00d;
let binary: number = 0b1010;
let octal: number = 0o744;
let big: bigint = 100n;Try

Code Example 4

const listOfStrings: string[] = ['hello', 'mom'];

Learn ReactJs, React Native from akashmittal.com