js中的数据结构思考

版权声明:== https://github.com/fyonecon == https://blog.csdn.net/weixin_41827162/article/details/82781625

-

js的数据类型感觉很混乱,喜欢用字典操作键值对,Map以后再用吧。

-

数组字典(多维数组、json):

let array=[
    {
        type:'text',
        content:{ 
               type:'number', 
               content:'12345678', 
        },
    },
];

-

map键值对:

let map = new Map([
    ["one", 1],
    ["two", 2],
]);

-

猜你喜欢

转载自blog.csdn.net/weixin_41827162/article/details/82781625