remove repeated letters in string

by John Kiran

JavaScript

let str="thequickbrownfoxjumpsoverthelazydog";
let arr=str.split("");

let unique = [...new Set(arr)].join("");
alert(unique);