题解 | #搜索数字#

https://www.nowcoder.com/practice/f7df2b13dce44b7498a13c1df1652779

const isDigit = (c) => '0123456789'.indexOf(c) != -1;

function _search(s) {
    for (const c of s) {
        if (isDigit(c)) return true;
    }
    return false;
}

全部评论

相关推荐

爪哇沉淀ing:哎 感觉很丰富 其实没啥含金量 我本科也是理工的 实话实说这个学校真的没啥竞争力 建议还是提升学历
今天你投了哪些公司?
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务