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

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 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!