Why is function working properly run by itself, but jest is receiving undefined instead of true/false?

后端 未结 0 581
庸人自扰
庸人自扰 2020-12-02 05:14
function isPalindrome(str, reverse=[], i=str.length - 1) {
if (i < 0) {
  if (reverse.join("") === str){
    return true
  }
  return false
}
reverse.pu         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题