Show Unicode-pairs as icon by using fromCodePoint
Keep in mind that Unicode has to be changed into a combination that JavaScript is able to read.
A unicode of U+1F1EC becomes 0x1F1EC. In other words, the front-two characters are replaced from U+ to 0x.
The rest is quite straightforward as seen below:
// original unicodes: U+1F3F3 U+FE0F U+200D U+1F308
const icon = String.fromCodePoint(0x1F3F3, 0xFE0F, 0x200D, 0x1F308)
console.log(icon) // 🏳️🌈
24 november 2022