Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript key value array

let indexedArray: {[key: string]: number}

let indexedArray: {[key: string]: number} = {
    foo: 123,
    bar: 456
}

indexedArray['foo'] = 12;
indexedArray.foo= 45;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #key #array
ADD COMMENT
Topic
Name
3+8 =