showing results for - "javascript anagram check"
Stefano
29 Feb 2020
1const areAnagram = (str1, str2) => str1.toLowerCase().split('').sort().join('') === str2.toLowerCase().split('').sort().join('');
2
3// Examples
4areAnagram('listen', 'silent');         // true
5areAnagram('they see', 'the eyes');     // true
6areAnagram('node', 'deno');             // true
Davin
25 Apr 2017
1function isAnagram(stringA, stringB) {
2  // Sanitizing
3  stringA = stringA.toLowerCase().replace(/[\W_]+/g, "");
4  stringB = stringB.toLowerCase().replace(/[\W_]+/g, "");
5
6  // sorting
7  const stringASorted = stringA.split("").sort().join("");
8  const stringBSorted = stringB.split("").sort().join("");
9
10  return stringASorted === stringBSorted;
11}
Lisa
08 Mar 2020
1function anagram(name, words) {
2	name =  name.toLowerCase().split('').sort().join('').trim();
3  words = words.join('').toLowerCase().split('').sort().join('');
4  return name === words;
5}
queries leading to this page
fun with anagrams javascripthow to check if it contains anagramshow to generate different anagrams in javascript for a stringfirst anagram using index of javascriptanagram code in javascriptanagrammes jsanagrams algorithm javascriptchecking if a string is an anagramangrams programing in javascriptprogram for finding anagrams in javascriptcheck if its anagram pythonhow to check string anagramsanagram check in python anagram javascriptanagrama em javascriptanagram using js setanagram solver javascript number of arrangementsjavascript algorithm for detecting anagram in a sentenceanagrams finder javascriptanagram problem in javascriptanagram js functionarray indexof javascript return anagramanagram algorithm javascriptjs make anagramanagrams finder javascript for a wordcheck if anagrams in jsanagram foreach jscheck if a string is anagrampython anagram checkanagram interview questions javascripthow to check if two words are anagrams in javascriptalphabetic anagrams javascriptcheck two anagram in javascriptcheck anagram python 3anagrama jshow to print anagrams in javascriptcheck for anagrams in two strings javascriptcheck anagram in javascripthow to check if two string are anagrammake an annagram javascript algorith 2canagram detection jscheck anagramis anagram jscheck if words are anagrams javaanagram checkhow to write an anagram function javascriptanagram function javascripthow many rearrangement to solve anagram javascriptjs string anagramwhere my anagrams at javascriptjs anagram in stringshow to check anagram string in javascriptjavascript finding all anagramsjavascript get anagrams stringcheck anagram pythonanagram of a word javascript one lineanagram code in jsjavascript check arrays anagramsanagram checker jscheck for anagrams jsjs anagramanagram js codejs anagramshow to check anagram in javascriptanagram in the jsreturn anagram javascriptanagram javascript solutionanagrams jsfind all anagrams javascripthow to find in an anagram in jsanagram in js 5danagram check pythoncheck if words are anagrams onlinehow many anagrams exist in a string javascriptuse sets as anagrams jsanagram javascriptall anagrams jsjava program to check anagramjavascript possible anagramscheck if string is an anagramanagrama javascriptanagram injsjs is angramanagram coding jsanagram count javascriptanagram checker in javascriptanagrams js what is thatjavascript anagrams functionsimple program to find anagrams in javascriptcheck if anagramcheck if strings are anagrams pythonanagram indexof javascriptjavascript anagram functionanagram 2 string javasvriptcoding an anagram solver javascriptcheck anagram in pythongenerate anagrams jsreturn if anagram in jsanagram detector in javascriptwhat is anagram javascript javascript anagram two stringsanagrams problem javascriptjavascript check if string is anagramjs is anagramjavascript find anagrams string generate anagrams javascriptcheck anagram in javascript formatted stringfind twin word jscheck for anagramcheck anagram jsjavascript anagram checkeranagrams o 28n 29 javascript without sortanagram checker and finder in javascriptfind anagrams jspython check for anagramcreate an annagram from a string javascriptanagrams from a string javascriptremove anagrams from array javascriptcheck anagram in jsjavascript numbers anagramcounting anagram jsanagram javasriptanagrams o 28n 29 javascriptjavascript anagram solverhow to find anagram using javascriptanagram for arrays in javascript problemsanagram solution javascriptanagramas javascriptanagram program in jsanagram solver javascriptanagram checkerjavascript check if anagramget array elements that are anagrams of each other javascripttwin word program in javascriptanagram using object javascriptanagram program in javascriptanagram solution in jstwo strings are anagrams in jsjavascript anagram checkjavascript find anagramsanangram javascriptcheck if anagram or notanagram sets in javascripthow to find anagram in javascriptanagram js function arrayjavascript anagram listhow to do an anagram in javascriptanagrams javascript true or falsejs find anagrams in a list of wordsvalid anagramjava check anagramvalid anagrams jscheck if string is an anagram javascriptcheck string is anagram or not javascript js all anagramscompare and remove anagrams jsangrams javascriptanagram program in javascrcoding anagram solver javascriptnumerical anagrams jsanagrama function jschecking anagrams in javajavascript code to check anagramcheck anagram in javaanagram string in javascriptfinding out anagrams using jscheck anagram correcthow to check if a string is anagram of anotherjava program to check for anagramall anagrams javascriptprint anagrams in a array of strings in jsanagram in jsanagram javascript examplehow to write anagram in javascriptjavascript how to create anagrams using es6java script anagramshow to make anagrams of words in javascript anagram javascriptfind anagrams in list of strings jsanagram detection javascriptanagrams in jscheck if string is anagram javascriptcheck string is anagram or notjs check for anagramcheck if two strings are anagrams javascriptcheck if words are anagramsanagrams in javascriptcheck anagrams javascriptcheck string is anagram or not java javascriptcheck anagrams in pythonanagram jscheck if something is anagram of someting elsehow to check anagram in a listanagram logic in javascripthow to check anagram pythoncheck if strings are anagram of each otherjavascrip generate anagrams 3cjavascript anagramanagram example in javascriptjavascript function to detect anagram counts in string arrayjavascript anagrams delete oneanagram javscriptjavascript program to check anagramjs find anagramanagrams algorithms jsanagrams javascript functioncheck if string are anagramcheck anagram or not in javaan anagrams of a string javascriptfind anagrams of a string javascriptanagrams javascriptcheck if word is anagram in pythonhow to find anagram javascriptmake anagram in jsjavascript anagram most efficient wayanagram check js without using inbuilt methodscheck anagram javascripthow to check anagram javascriptjavascript anagramaanagram program in javascript regexcheck if its anagram javaanagram checker javascripttwo words of anagrams programming in javascripthow to write a javascript function that takes in an anagramcheck two string are anagrams javascriptanagram check javascriptonline check if anagramanagram in javascript problemsanagram js programanagram in javascripthow to check if a string is an anagram in pythonfirst anagram javascriptanagram array javascript solution es5all anagrams of a string javascriptcheck if anagram javaanagrams log 28n 29 javascriptjavascript anagram check 22fun with anagrams 22 javascriptcheck for anagram in pythondetect anagrams in a sentence javascriptcheck if anagramm javascripthow to do anagrams in javascriptjavascript count anagramsannagram jsfind anagrams javascriptanagram meaning jsanagram meaning in jsanagram with all the letters javascriptanagram detector regexjavascript anagram checker without inbuilt functionsjavascript count anagram in arrayfind all anagram in an array javascriptcheck if anagram javascriptgenerate possible anagram jsjavascript check for anagrampython check if anagramcheck if string is anagramjs anagram functionanagrams 2c javascriptjavascript anagramsjavascript digit anagramswhere my anagrams at jsvalid anagram javascriptpython check anagramcheck the string is anagram or notfunction anagrams 28word words 29 javascriptcheck if string are anagram python javascript algorithm for detecting anagram in a stringis anagram javascriptcheck for anagram in list pythonanagram array javascripthow to check for anagram in javascriptjavascript anagram check