jQuery to remove duplicate items from array

Find jQuery code to remove duplicate items from an array using $.unique().

Earlier I had posted about jQuery solution to remove item from array, split an array, combine/join arrays and Find index of element in array, And In this post, find how to remove duplicate items from array with example.

$(document).ready(function () {
    var arr = [10, 19, 22, 36, 50, 74, 10, 22];
    $('#dvallElements').html(arr.join("<br />"));
    arr = $.unique(arr);
    $('#dvUniqueItems').html(arr.sort().join("<br />"));
See result below

See Complete Code
Feel free to contact me for any help related to jQuery, I will gladly help you.

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..