Currently, I am facing an issue where Javascript splits emojis with different skin colors into multiple characters instead of treating them as one. Emojis with a yellow skin color work fine and give me the desired results.
For example:
let emojis = [..."πππ€©πππ£π€©"]
console.log(emojis)
console.log(emojis.length)
However, when dealing with emojis like this, there is a problem as Javascript does not support the use of the [...] operator for these emojis:
let emojis = [..."π§πΎπ¨π»π§πΌπ¦π½π§πΏ"]
console.log(emojis)
console.log(emojis.length)
I want to find a way to inform Javascript that these are single emojis with a length of one, rather than multiple emojis combined together like in this instance:
let emojis = [..."π©ββ€οΈβπβπ©"]
console.log(emojis)
console.log(emojis.length)