MediumPro challengePythonJavaScriptTypeScript

Base64 Decode

Node.jsEncodingBuffers

Decode a Base64 string into an array of bytes.

solve('TWFu')[77, 97, 110].

Trailing = indicates padding. Input is always valid base64.

Sample tests

Test #1"Man"
Input: ["TWFu"]
Output: [77,97,110]
Test #2One = padding
Input: ["TWE="]
Output: [77,97]
Test #3Two = padding
Input: ["TQ=="]
Output: [77]
Test #4Empty
Input: [""]
Output: []
Test #5"Hi"
Input: ["SGk="]
Output: [72,105]