DEV Community

loading...

Discussion on: Reverse a String - Four JavaScript Solutions

Collapse
javver profile image
Javier Cardona • Edited

Just don't use any emoji with skin color modifier though...

"🤷🏻‍♂️" split on '' becomes 7 "strings"

"🤷🏻‍♂️".split('').reverse().map(c => c.charCodeAt(0).toString(16))
// ["fe0f", "2642", "200d", "dffb", "d83c", "dd37", "d83e"]

That reversed looks... weird.
"️♂‍�🄷�"