Answers for "how to get unique values from array in javascript without duplicate value"

0

how to get unique values from array in javascript without duplicate value

function uniqueArray2(arr) {
    var a = [];
    for (var i=0, l=arr.length; i<l; i++)
        if (a.indexOf(arr[i]) === -1 && arr[i] !== '')
            a.push(arr[i]);
    return a;
}
Posted by: Guest on June-19-2020

Code answers related to "how to get unique values from array in javascript without duplicate value"

Code answers related to "Javascript"

Browse Popular Code Answers by Language