数组

数组遍历

const ary = [1,6,89,78,,90];
        for(let i=0;i

数组去重

var ary2 = ["apple",1,2,2,2,"banner","apple"];
        var unique = [];
        for(let i=0;i
Array.prototype.uniq = function () {
    var result = [];
    var flag = true;
    for(var i =0;i

你可能感兴趣的:(数组)