Skip to content

Commit 8c06a9a

Browse files
committed
palindrome
1 parent 50477e4 commit 8c06a9a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

palindrome2.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function palindrome(str){
2+
return str.split('').every((char, i) => {
3+
return char === str[str.length - i - 1];
4+
});
5+
}

0 commit comments

Comments
 (0)