自己方法如下:
function isHuiwen(text) {
if(text.length <= ) return true;
if(text.charAt(0) != text.chatAt(text.length - 1)) return false;
return isHuiwen(text.substr(1, text.length - 2));
}
还有一个疑问当text参数为null或者undefined时,结果又因时怎样呢
拉丁的传说
喵喔喔
随时随地看视频慕课网APP
相关分类