+ 3

Emoji doesn't loading right

In the code below I try to change the content of a div. I created an array with emojis and choose one. The div changed but it's not the right emoji. https://code.sololearn.com/WE4nnqv3xwaM/?ref=app

16th Feb 2023, 4:49 PM
Stefanoo
Stefanoo - avatar
4 Answers
+ 5
Try const EMOJIS = "😄 😂 😉 â˜ș".split(" ") I would assume that splitting at "" messes the emoji character codes.
16th Feb 2023, 5:05 PM
Lisa
Lisa - avatar
16th Feb 2023, 6:43 PM
BroFar
BroFar - avatar
+ 2
Ah okey thanks 😄 It works.
16th Feb 2023, 5:09 PM
Stefanoo
Stefanoo - avatar
+ 1
It works perfectly fine Cool
18th Feb 2023, 2:54 AM
Timothy
Timothy - avatar