xxxxxxxxxx
const byteArray = new Uint8Array([
74, 97, 118, 97, 83, 99, 114, 105, 112, 116,
]);
// this can also be used to decode buffer from streams
const decoder = new TextDecoder("utf-8");
const str = decoder.decode(byteArray);
console.log(str); // should print "JavaScript"