Skip to content

Commit

Permalink
bytesToBase64 example: use String.fromCodePoint.apply (mdn#29254)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegommm authored Sep 23, 2023
1 parent 3f4eae0 commit 59921d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/glossary/base64/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function base64ToBytes(base64) {
}

function bytesToBase64(bytes) {
const binString = Array.from(bytes, (x) => String.fromCodePoint(x)).join("");
const binString = String.fromCodePoint(...bytes);
return btoa(binString);
}

Expand Down

0 comments on commit 59921d9

Please sign in to comment.