Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

anagram javascript example

function anagram(name, words) {
	var a = name.replace(/s/g,'').toLowerCase().split('').sort().join('');
	var b = words.join('').split('').sort().join('');
	return a == b;
}
 
PREVIOUS NEXT
Tagged: #anagram #javascript
ADD COMMENT
Topic
Name
1+1 =