Byte Lab · Level 1 of 5

Letters are not bytes

A five-letter word with one accent, measured two ways.

const word = 'héllo';console.log('length ' + word.length);console.log('bytes ' + Buffer.byteLength(word));const buf = Buffer.from(word);console.log(buf.toString('hex'));

1. Predict the output

Tap the lines in the order you think they print.

  1. 1…
  2. 2…
  3. 3…