Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript map

Shorthand: (key,value) Map 

const callbackMap = new Map<string, PushEventCallback>([
      ["addComment", addCommentCallback],
      ["commentModified", editCommentCallback]
]);

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#:~:text=Cloning%20and%20merging%20Maps
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #map
ADD COMMENT
Topic
Name
2+9 =