EXERCISE · AlgoCasts

Anagrams

Check to see if two provided strings are anagrams of eachother. One string is an anagram of another if it uses the same characters in the same quantity.

6 testsAlgoCastsGPL-3.02 alternatesexercise 07 of 26

Directions

Directions

Check to see if two provided strings are anagrams of eachother. One string is an anagram of another if it uses the same characters in the same quantity. Only consider characters, not spaces or punctuation. Consider capital letters to be the same as lower case

Examples#

JS
anagrams('rail safety', 'fairy tales') --> Trueanagrams('RAIL! SAFETY!', 'fairy tales') --> Trueanagrams('Hi there', 'Bye there') --> False

Try it first#

Copy the stub, make the 6 tests pass on your machine, then open the solution. The reveal is remembered per page in this browser.

JSexercises/anagrams/index.js
function anagrams(stringA, stringB) {} module.exports = anagrams;

See also