i’m little curious
what’s wrong here, if i want to solve like this way? please mention points and describe.
Your code so far
function palindrome(str) {
// Good luck!
var splitArray = str.split('');
var reverseArray = splitArray.reverse();
var joined = reverseArray.join('');
if (joined == str) {
return "true";
}
else {
return "false";
}
return joined;
}
palindrome("eye");
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/check-for-palindromes