const initialArr = new Uint8Array(someRandomValues)
console.log(initialArr) // Uint8Array(32) [ 72, 173, 29, 53, 60, 34, 87, 32, 196, 56, … ]
const str = new TextDecoder().decode(initialArr)
console.log(str) // H��5<"W �8b�z��M��c�yQ�g����M8�
const arr = new TextEncoder().encode(str)
console.log(arr) // Uint8Array(55) [ 72, 239, 191, 189, 29, 53, 60, 34, 87, 32, … ]
new Uint8Array([1,2,3]).toString()
> "1,2,3"
new Uint8Array("1,2,3".split(','))
> Uint8Array [1, 2, 3]