how do i make a test a function in javascript with instructions as follows allAnagrams( words ) This function accepts a single string. The string contains zero or more words, each separated by spaces....


how do i make a test a function in javascript with instructions as follows


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



this HAS to take in one string as the input



Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here