← Back to Gists

extract array unique values

📝 JavaScript
This snippet removes duplicate values from an array, returning only the unique elements.
JavaScript
function uniqueArray(arr) { return [...new Set(arr)];
}

Comments

No comments yet. Start the discussion.