Split big characters

For example, I want to separate capital letters in a text.

text = “Hey YASİN”
response = “H YASİN”

but I couldn’t find a method.

1 Like

Hey @Yasin, do you know regular expressions?
In your case,

text.match(/[^a-z]+/g).join('')

or simply,

text.replace(/[a-z]+/g, '')
2 Likes