Skip to content

Commit 972ba03

Browse files
committed
valid anagram solution
1 parent df2c6c6 commit 972ba03

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

valid-anagram/RiaOh.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @param {string} s
3+
* @param {string} t
4+
* @return {boolean}
5+
*/
6+
var isAnagram = function (s, t) {
7+
let resultS = [...s].sort();
8+
let resultT = [...t].sort();
9+
return resultS.join() === resultT.join();
10+
};

0 commit comments

Comments
 (0)