how to convert value to string in javascript code example Example 1: js variable to string `String text ${expression}` Example 2: how to convert set to a string in js [...foo].join(' ')