r/learnjavascript • • Nov 03 '20

22 Javascript String Methods 🔥

201 Upvotes

9 comments sorted by

View all comments

3

u/skerit Nov 03 '20

Be careful when using String#length, some unicode characters count for 2. Take "🔥" for example. Splitting this string in half will break the emoji.