🏜️ Word Flip Canyon

Pull the magical levers to reverse the order of words

📜 Original Sentence
1
Split by spaces
2
Reverse word list
3
Join with spaces
FLIP!
🔄 Reversed Sentence
✨ Final Result
-
🔮 Word Reversal Algorithm
function reverseWords(s):
words = s.split(" ") // Split by spaces
words.reverse() // Reverse the array
return words.join(" ") // Join back