Open this example in the interactive library
Source code
const data = new TextEncoder().encode("café");
console.log([...data], new TextDecoder().decode(data));
Sample output
[ 99, 97, 102, 195, 169 ] café

Open this example in the interactive library
const data = new TextEncoder().encode("café");
console.log([...data], new TextDecoder().decode(data));
[ 99, 97, 102, 195, 169 ] café