JSFiddle - React, Tailwind, and code Playground

JavaScript

// Method 1

let users = ["John", "Murray", "Jane", "Jane", "Anne"];

function unique(users) {
	return Array.from(new Set(users));
}

console.log(unique(users));

// Method 2

let set = new Set(users);
let arrFromSet = [...set];

console.log(arrFromSet);