/anagram-test

Primary LanguageJavaScript

Instructions

Problem description

By definition, an anagram is a word formed by rearranging the letters of another, such as spar, formed from rasp.

Your task is to implement the function anagram, which prototype can be found in the file anagram.js:

function anagram(str1, str2) {

}

The functions receives 2 strings as parameters and it should return true if str2 is an anagram of str1 and false otherwise.

In order to solve the problem you can use any open source third-party libraries from the npm registry.

Once the problem is solved, please open a pull request with your solution.

Before starting

Install dependencies:

$ npm install

Running the tests

$ gulp test