JavascriptLogic#15 — Check Anagram Two words are anagrams if they have the same letters in a different order. Example: listen - silent ✅ Both have the same letters. hello - world ❌ Different letters. JavaScript Code: ➡ breaks the word into letters Example listen → ["l","i","s","t","e","n"] sort() ➡ arranges letters in order join("") ➡ joins letters back into a word So both words become the same after sorting. If both words are equal, they are anagrams. #JavaScript #CodingPractice #LearningJourney
A or b same nahi isliye output not anagram
The Final output is Anagram 😊