How to delete characters that aren't letters (emojis, ★, etc.)

only keep A-Z 0-9 and remove other characters from string using javascript - Stack Overflow