palindromes_checks
Version:
24 lines (19 loc) • 480 B
JavaScript
const app=require('express')()
const pali=(testString)=>{
const checkone=testString.toLowerCase()
const checkTwo=checkone.split('').reverse().join('')
console.log(checkone);
console.log(checkTwo);
if(checkone===checkTwo){
return `${testString} is a palindrome`
}
else{
return `${testString} is not a palindrome`
}
}
//racecar
let test=pali('Hannahs')
console.log(test);
app.listen(3000,()=>{
console.log('server started at 3000');
})