Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript map shorthand

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 #shorthand
ADD COMMENT
Topic
Name
3+4 =