Jump to: navigation, search

JQuery Array unique

From w3cyberlearnings

Contents

jQuery Eliminate Duplicated Array Element

Uses $.unique() function to eliminate all duplicated elements.

Syntax $.unique()

 
$.unique(array);

Example

$(document).ready(function() {
	var myList = [3,4,5,23,4,51];
	$.unique(myList);
	alert(myList.length);
});

Output

5

Related Links


Navigation
Web
SQL
MISC
References