anagram js
JavaScript
function isAnagram(stringA, stringB) {
// Sanitizing
stringA = stringA.toLowerCase().replace(/[\W_]+/g, "");
stringB = stringB.toLowerCase().replace(/[\W_]+/g, "");
// sorting
const stringASorted = stringA.split("").sort().join("");
const stringBSorted = stringB.split("").sort().join("");
return stringASorted === stringBSorted;
}
Also in JavaScript:
- Title
- how to rerender a page in React when the user clicks the back button
- Category
- JavaScript
- Title
- how to delete a variable in js
- Category
- JavaScript
- Title
- javascript array flat
- Category
- JavaScript
- Title
- if (req.url === "/script.js")
- Category
- JavaScript
- Title
- add firebase angular
- Category
- JavaScript
- Title
- constructor in js
- Category
- JavaScript
- Title
- Basic JavaScript: Use Recursion to Create a Range of Numbers
- Category
- JavaScript
- Title
- how to validate an email address in javascript
- Category
- JavaScript
- Title
- How to pass variables from js to html node
- Category
- JavaScript
- Title
- get value onChange from mat-select angular
- Category
- JavaScript
- Title
- javascript Clone an array
- Category
- JavaScript
- Title
- convert date to string javascript
- Category
- JavaScript
- Title
- how to add object to array javascript
- Category
- JavaScript
- Title
- how to update angular version
- Category
- JavaScript
- Title
- convert a string to html element in js
- Category
- JavaScript
- Title
- autocomplete typeahead ajax
- Category
- JavaScript
- Title
- how to split an array in javascript
- Category
- JavaScript
- Title
- include jquery
- Category
- JavaScript
- Title
- append before jquery
- Category
- JavaScript
- Title
- add month date now javascript
- Category
- JavaScript
- Title
- how to access a database in express
- Category
- JavaScript
- Title
- dot geometru three js
- Category
- JavaScript
- Title
- fromjson method convert integer to double
- Category
- JavaScript
- Title
- can we import jquery library from developer tools
- Category
- JavaScript
- Title
- convert json to 2d array
- Category
- JavaScript
- Title
- async await react stackoverflow
- Category
- JavaScript
- Title
- how to check chrome version in js
- Category
- JavaScript
- Title
- how to save thing in cookie js
- Category
- JavaScript
- Title
- dropzone add download button addedfile
- Category
- JavaScript
- Title
- angularjs class directive prepend
- Category
- JavaScript
- Title
- javascript break inner loop only
- Category
- JavaScript
- Title
- find index of object in array javascript
- Category
- JavaScript
- Title
- how to attach javascript to html
- Category
- JavaScript
- Title
- gsap
- Category
- JavaScript
- Title
- empty a select input using js
- Category
- JavaScript
- Title
- bubble sort
- Category
- JavaScript
- Title
- google script get name of google form
- Category
- JavaScript
- Title
- group by in javascript
- Category
- JavaScript
- Title
- javascript closure stack overflow
- Category
- JavaScript
- Title
- electron new window
- Category
- JavaScript
- Title
- express get params after ?
- Category
- JavaScript
- Title
- iso to date javascript
- Category
- JavaScript
- Title
- how to get textedit on mac without download
- Category
- JavaScript
- Title
- code to launch browser using javascript
- Category
- JavaScript
- Title
- iterate over object javascript
- Category
- JavaScript
- Title
- closure javascript
- Category
- JavaScript
- Title
- iterate through list javascript
- Category
- JavaScript
- Title
- ion-fab-button ionic angular
- Category
- JavaScript
- Title
- "..." in javascript
- Category
- JavaScript
- Title
- how to open new tab in vscode using keyboard
- Category
- JavaScript
- Title
- fivem trigger javascript function
- Category
- JavaScript
- Title
- angular list contains property
- Category
- JavaScript
- Title
- how to get the index of an array in javascript
- Category
- JavaScript
- Title
- convert string with dot or comma as decimal separator to number in javascript
- Category
- JavaScript
- Title
- angular two datepickers
- Category
- JavaScript
- Title
- is undefined javascript
- Category
- JavaScript
- Title
- convert jquery to string
- Category
- JavaScript
- Title
- how to use chart js in vue js
- Category
- JavaScript
- Title
- form taglib in jsp
- Category
- JavaScript
- Title
- How to get the path to the file that required your module?
- Category
- JavaScript
- Title
- function inside object javascript
- Category
- JavaScript
- Title
- array map javascript
- Category
- JavaScript
- Title
- how to push values in array
- Category
- JavaScript
- Title
- javascript click event notifications
- Category
- JavaScript
- Title
- axios set authorization header
- Category
- JavaScript
- Title
- how to delete object property of array javascript
- Category
- JavaScript
- Title
- javascript check if value in array
- Category
- JavaScript
- Title
- add jquery to wordpress
- Category
- JavaScript
- Title
- how to inject service in component angular 6
- Category
- JavaScript
- Title
- docker node label add
- Category
- JavaScript
- Title
- hello
- Category
- JavaScript
- Title
- If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will permanently disable this message but you might encounter other issues.
- Category
- JavaScript
- Title
- for in javascript
- Category
- JavaScript
- Title
- get the value of a checkbox jquery
- Category
- JavaScript
- Title
- get attribute value jquery
- Category
- JavaScript
- Title
- ignore node modules
- Category
- JavaScript
- Title
- javascript bind this syntax
- Category
- JavaScript
- Title
- how to make a show password button
- Category
- JavaScript
- Title
- javascript add row to table
- Category
- JavaScript
- Title
- chrome add bookmark that prefixes text
- Category
- JavaScript
- Title
- angular check if control has required validator
- Category
- JavaScript
- Title
- case in javascript
- Category
- JavaScript
- Title
- Finding HTML Elements
- Category
- JavaScript
- Title
- javascript arrow function
- Category
- JavaScript
- Title
- go to another page using javascript
- Category
- JavaScript
- Title
- how to count the rows of gridview in asp.net using jquery
- Category
- JavaScript
- Title
- how the filter() function works javascript
- Category
- JavaScript
- Title
- discord js delete message after time
- Category
- JavaScript
- Title
- Angular empty object
- Category
- JavaScript
- Title
- delete session javascript
- Category
- JavaScript
- Title
- how to apply gavity to code in javascript
- Category
- JavaScript
- Title
- Angular Quick Tip: Binding Specific Keys to the Keyup and Keydown Events
- Category
- JavaScript
- Title
- form validation in reactstrap
- Category
- JavaScript
- Title
- event import in angular
- Category
- JavaScript
- Title
- firestore batch add array
- Category
- JavaScript
- Title
- how to make actionsheet on cordova forandroid
- Category
- JavaScript
- Title
- how to set random dice image with js
- Category
- JavaScript
- Title
- how to detect a keypress in javascript
- Category
- JavaScript
- Title
- get the id of a div in jquery
- Category
- JavaScript
- Title
- get parent element using jquery
- Category
- JavaScript