Text UtilitiesLesson 113Free preview
Reverse Text
This lesson is part of Web Developer Tools · All levels
Summary
Reverse text reverses the order of characters, words, or lines in a text. Character inversions are often used for string and puzzle exercises, whereas word or line inversions are useful for changing the order of lists. In JavaScript, use Array.from or spread to keep the emoji and Unicode characters intact. The inverse result is not encryption because anyone can reverse it.
Key points
- Available in character, word, and line modes
- Split('').reverse() .join('') reverses the ASCII character
- Or spread more secure for emoji
- Returning words maintains the spelling of each word
- Reverse is not a method of data security
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.