Answers for "typescript initialize map inline"

2

typescript initialize map inline

new Map<string, string>([
  ["key1", "value1"],
  ["key2", "value2"]
]);

new Map<string, Array<string>>([
  ["key1", ["value1", "value2"]],
  ["key2", ["value3"]]	
]);
Posted by: Guest on September-04-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language