> str = '\xae\xee'
'®î'
How to convert [0xae, 0xee] to '®î'?
> str = '\xae\xee'
'®î'
How to convert [0xae, 0xee] to '®î'?
You can use String.fromCharCode() to convert the hex values to their string representation with .map() and .join() to form a string:
const hex = [0xae, 0xee];
const res = hex.map(s => String.fromCharCode(s)).join('');
console.log(res);
.map() isn't working here is because .map() will pass through the index as the second argument for String.fromCharCode(). We need to explicitly call it (.map(x => String.fromCharCode(x))) - I've updated my code