4 Ways to Get All Characters in a String in JavaScript

Stop using string.split(‘’) — It’s dangerous 💀

🔥 Emoji ☠️

ES6 to the rescue!

Array.from()

Spread operator

For…of loop

RegExp unicode flag

Browser support

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store