I want to write array elements only one time. Such as if i want to write 3 it should write once only. Is it possible achiving it using array.
my code
var arr = [ 1,1,1,1,1,1,1,1,3,3,3,3,3,3,4,4,4,4];
arr = $.grep(arr, function( x, y ) {
return ( x !== 1);
});
$( "p>span" ).text( arr.join( ", " ) );
DEMO;