['Sam', 'Justin', 'Andrew', 'Dan', 'Sam'].uniq();
// -> ['Sam', 'Justin', 'Andrew', 'Dan']
['Prototype', 'prototype'].uniq();
// -> ['Prototype', 'prototype'] because String comparison is case-sensitive
without():
复制代码 代码如下:
[3, 5, 6, 1, 20].without(3)
// -> [5, 6, 1, 20]
[3, 5, 6, 1, 20].without(20, 6)
// -> [3, 5, 1]