create a javascript function that allAnagrams( words ) This function accepts a single string. The string contains zero or more words, each separated by spaces. This function must return true if each...


create a javascript function that


allAnagrams( words )

This function accepts a single string. The string contains zero or more words, each separated by spaces. This function must return true if each of the words is an anagram of the others and return false otherwise.


Examples




  • allAnagrams("naps pans span") => true

  • allAnagrams("") => true

  • allAnagrams("part tarp rappt") => false

  • allAnagrams("span span") => true

  • allAnagrams("spear pears parse pares reaps") => true




Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here