Question: Write aJavaScriptfunctionfthat takestwo strings as arguments check whether two strings are anagrams and returntrue of false. An anagram of a string is another string that
takestwo strings as arguments
check whether two strings are anagrams
and
returntrue of false.
An anagram of a string is another string that contains same characters, only the order of characters can be different.
Examples
f(abcd, dabc)Expected true
f(abcd, abcc)Expectedfalse
Write a JavaScript program to read the input data, call the function f, and write the output data.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
