изменить строку на объект в HTML

let str = new String('foobar');
console.log(typeof(str)) //object
Combative Curlew