const enc = new TextEncoder()
const buf = enc.encode('π')
buf.length // β 4 (4 bytes for this emoji)Emoji and other multi-byte characters produce multiple bytes per character.
In encode('AB'), the second byte (index 1) is the ASCII code for 'B', which is 66.
Challenge: Verify encode('AB')[1] === 66.