gpt4 book ai didi

JavaScript 连接两个 Map 对象

转载 作者:行者123 更新时间:2023-11-30 07:57:12 24 4
gpt4 key购买 nike

<分区>

有没有办法像数组连接一样将两个(或更多)映射对象连接到一个映射?

var map1 = new Map([['breakfast', 'meal'], ['dinner', 'meal']]);
var map2 = new Map([['launch', 'meal'], ['dinner', 'meal']]);
var concatenated = map1.concat(map2);

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com