Create a `Buffer` for a given string with binary encoding => Use `Buffer.toString('base64')` to return encoded string code example
Example: Create a `Buffer` for a given string with binary encoding => Use `Buffer.toString('base64')` to return encoded string
/** 1. Create a `Buffer` for a given string with binary encoding* 2. Use `Buffer.toString('base64')` to return encoded string*/ const btoa = str => Buffer.from(str, 'binary').toString('base64'); btoa('foobar'); // 'Zm9vYmFy'