如何判断两个数组或者map是否相同

数组
let a = [1,2],b =[1,2];
a.toString() == b.toString()
map
let c = {"d":33,"f":44},d = {"d":33,"f":44};
JSON.stringify(c) == JSON.stringify(d);
posted @ 2024-10-21 14:21  流星曳尾  阅读(3)  评论(0编辑  收藏  举报