Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var uniqueValues = function(data) {
- var dict = {};
- var result = [];
- data.forEach(function(element, index, array) {
- if (!(element in dict)) {
- result.push(element);
- dict[element] = true;
- }
- });
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement