Guest User

Untitled

a guest
May 24th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Array.prototype.unique = function () {
  2. var keys = {},
  3. result = [],
  4. items = this.length
  5.  
  6. while ( items )
  7. keys[ this[ --items ] ] = true
  8.  
  9. for ( var key in keys )
  10. if ( !keys.hasOwnProperty( key ) )
  11. continue
  12. result.push( key )
  13.  
  14. return result
  15. }
Add Comment
Please, Sign In to add comment