js decode base64 utf8

Solutions on MaxInterview for js decode base64 utf8 by the best coders in the world

showing results for - "js decode base64 utf8"
Giorgia
01 Jul 2017
1const ok = "a";
2console.log(ok.codePointAt(0).toString(16)); //   61: occupies < 1 byte
3
4const notOK = "✓"
5console.log(notOK.codePointAt(0).toString(16)); // 2713: occupies > 1 byte
6
7console.log(btoa(ok));    // YQ==
8console.log(btoa(notOK)); // error