+ 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.
3 ответов
+ 1
can i wrote it in c
0
هندسة المعلوماتية
0
function isPalindrome (var s) {
var sRev = '';
for (var i=s.length; i>0; i--) {
sRev += s[i-1] ;
}
return s==sRev;
}