📜  javascript map set 速记 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:13.397000             🧑  作者: Mango

代码示例1
const callbackMap = new Map([
      ["addComment", addCommentCallback],
      ["commentModified", editCommentCallback]
    ]);

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#:~:text=Cloning%20and%20merging%20Maps