Skip to content

Commit 1bcfca3

Browse files
committed
Added Palidrome Code
1 parent f77a970 commit 1bcfca3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Data-Structures/Array/Palidrome.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Given an integer x, return true if x is a palindrome,and false otherwise.
2+
3+
/**
4+
* @param {number} x
5+
* @return {boolean}
6+
*/
7+
8+
9+
var isPalidrome = function y(){
10+
let intt = x.toString().split("").reverse().join("");
11+
return x = parseInt(intt)
12+
}

0 commit comments

Comments
 (0)