From 59921d91281642823feb3e6c3000eb47fec2013e Mon Sep 17 00:00:00 2001 From: Diego Augusto Molina Date: Sat, 23 Sep 2023 12:52:05 -0300 Subject: [PATCH] bytesToBase64 example: use String.fromCodePoint.apply (#29254) --- files/en-us/glossary/base64/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/glossary/base64/index.md b/files/en-us/glossary/base64/index.md index 80cfad2fd4b113a..f421e4436c228d1 100644 --- a/files/en-us/glossary/base64/index.md +++ b/files/en-us/glossary/base64/index.md @@ -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); }