Why are they named
If you have ever needed to encode text to Base64 or decode a Base64 encoded string to plain text, you should be familiar with the methods
Their names might have caught your attention and got you wondering, "Are these random names along the lines of
y_to_x? Why are they named so?"
Here is the explanation:
btoaimplies "binary to ASCII"
atobimplies "ASCII to binary"
Here "binary" and "ASCII" are used in a slightly different context.
- ASCII - printable ASCII characters,
=, which form the Base64 character set
- Binary - Any printable or non-printable characters
Old Unix names, hard to find man pages rn but see https://t.co/lWkceMwFad. The names carried over from Unix into the Netscape codebase. I reflected them into JS in a big hurry in 1995 (after the ten days in May but soon).
— BrendanEich (@BrendanEich) May 21, 2018