We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a90813c commit bd99545Copy full SHA for bd99545
README.md
@@ -23,4 +23,5 @@
23
| Problem - 19 | Get Url Parameters |
24
| Problem - 20 | Detect device types |
25
| Problem - 21 | Return the total of all the records' scores - GameOf11 |
26
+| Problem - 22 | Check the number is Palindrome or not |
27
<!-- | Problem - 22 | | -->
problem-22.js
@@ -0,0 +1,8 @@
1
+// check the number is Palindrome or not
2
+function isPalindrome(num) {
3
+ const temp = num.toString().split('').reverse().join('') * 1;
4
+ return (result = num === parseInt(temp) ? true : false);
5
+}
6
+
7
+console.log(isPalindrome(121));
8
+console.log(isPalindrome(320));
0 commit comments