typescript pair code example
Example 1: key value pairs typescript
var item: {[key: string]: number}
Example 2: typescript key value array
let indexedArray: {[key: string]: number}
let indexedArray: {[key: string]: number} = {
foo: 123,
bar: 456
}
indexedArray['foo'] = 12;
indexedArray.foo= 45;
Example 3: data type angular
let decimal: number = 6;
let hex: number = 0xf00d;
let binary: number = 0b1010;
let octal: number = 0o744;
let big: bigint = 100n;Try