Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0693498

Browse files
committedSep 19, 2018
Check for palindromes
1 parent 2451db9 commit 0693498

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* @param {string} string
3+
* @return {boolean}
4+
*/
5+
export default function palindrome(string) {
6+
reverseString = string.split("").reverse().join("");
7+
return reverseString === string;
8+
}

0 commit comments

Comments
 (0)
Please sign in to comment.