2. Write a JavaScript function that checks whether a passed string is palindrome or not? A palindrome is word, phrase, or sequ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

2. Write a JavaScript function that checks whether a passed string is palindrome or not? A palindrome is word, phrase, or sequ

2. Write a JavaScript function that checks whether a passed string is palindrome or not? A palindrome is word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run.

14th Dec 2016, 5:51 PM
Mohameddd Alanzy
Mohameddd Alanzy - avatar
3 Answers
+ 1
can i wrote it in c
14th Dec 2016, 6:08 PM
DeleteMe
0
هندسة المعلوماتية
14th Dec 2016, 6:12 PM
DeleteMe
0
function isPalindrome (var s) { var sRev = ''; for (var i=s.length; i>0; i--) { sRev += s[i-1] ; } return s==sRev; }
14th Dec 2016, 11:42 PM
Demeth
Demeth - avatar