console.log(getResult("6666")) function getResult(s) { let len = s.length let a = 0 let b = 0 if((s[0]>='a' && s[0]<='z') || (s[0]>='A' && s[0]<='Z')){ for(let i=1;i<s.length;i++){ if((s[i]>='a' && s[i]<='z') || (s[i]>='A' && s[i]<='Z')){ a++ }else if(s[i]>='0' && s[i]<='9'){ b++ }else{ return false } } if(b>=1) return true } return false }
全部评论
(3) 回帖