filtered array

Run Settings
LanguageJavaScript
Language Version
Run Command
var filteredArray = function (array){ var tmp = {}; return array.filter((item) => { return item in tmp ? null : tmp[item] = 1; }); }; var arr = ['1', 'apple', 'apple', '2', 'orange', '2']; console.log(filteredArray(arr));
Editor Settings
Theme
Key bindings
Full width
Lines