A text-to-binary function can pass every test with Hello and still produce the wrong bytes for 🙂.
The catch is deciding what “binary” means. For this article, the target is UTF-8 bytes, displayed as eight-bit groups. JavaScript string operations don't automatically give you those bytes.
Consider this implementation:
function naiveBinary(text) {
return text.split("")






