4 ms·
str.split('').reverse().join('')
by julienreszka 5y ago
str.split('').reverse().join('')
- Karawebnetwork 5y agoIn a tongue-in-cheek tone: Woah, so old school. We would never hire you! You have to show that you know ES6! [...str].reverse().join('')
- jandrese 5y agoWhich would fail. You got the directional formatting characters in the wrong order. It is 2022. If your code doesn't treat all strings as Unicode it is broken.