How to convert Set to string with space? You can use Array.from: Array.from(foo).join(' ') or the spread syntax: [...foo].join(' ')