编程语言
首页 > 编程语言> > JavaScript-map和set

JavaScript-map和set

作者:互联网

Map

        var map = new Map([['tom',100],['jack',99],['ss',89]]);
        var name = map.get('tom');
        map.delete('tom');

        var map = new Map([['tom',100],['jack',99],['ss',89]]);
        var name = map.get('tom');
        map.set('admin',123456);
        map.delete('tom');


Set:无序不重复的集合

标签:map,set,name,Map,JavaScript,tom,var
来源: https://www.cnblogs.com/speak-please/p/16248893.html