📜  javascript map 速记 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:03.143000             🧑  作者: 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