Remove all duplicate characters

by MegaScience

JavaScript

let str = 'This removes any text characters after their first occurance.'
document.body.textContent = [...new Set([...str])].join('')