SOURCE

var letter=[]
var word="monica"
var rword=""
for(var i=0;i<word.length;i++){
    letter.push(word[i])
}
for(var i=0;i<word.length;i++){
    rword+=letter.pop()
}
if(rword===word){
    console.log(word+" is a palinfrome")
}else{
    console.log(word+" is not a palinfrome")
}
console 命令行工具 X clear

                    
>
console