javascript set tostring code example Example 1: js tostring toString(123); Example 2: how to convert set to a string in js [...foo].join(' ')